The Date is displayed as "12/31/0"
The Date should be displayed correctly.
Hello,
The described behavior is expected.
When a Date in the SpreadSheet is created through the configuration by using the new Date (“01/01/0001”) the SpreadSheet will render “01/01/2001”. JavaScript interprets the year “0001” as the year “2001”. This behavior is due to the fact the dates in JavaScript starts from year 1970.
In cases when the date is entered manually Speadsheet interprets the entered input itself. For example, “01/01/0001” will be interpreted as 1 January of year 1. However, there is a known issue in Excel regarding dates before 1 March 1900. Excel incorrectly treats the year 1900 as a leap year. It accepts the 29 February 1900 as a valid date. As a consequence of this issue date calculations that span 29 February 1900 will be off one day. Below are links with more information on the topic:
- https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year
In order to synchronize the Spreadsheet behavior in Excel, and considering the fact that there is no date as 29 February 1900 in JavaScript, the prior dates will be off with 1 day. So, when 1 January 0001 is entered, the rendered day will be one day off (31 December 0000 year), as there are no negative dates in Excel.
Regards,
Neli
Progress Telerik