Formatted date without the year are always the current year

Hi - here is a bug with dates. When you exclude the year in the dateFormat option, eg “MMM DD”, you cannot set a date that is not of the current year.

Please see this fiddle. Change the year to not be 2025 using the date picker. Try to change the date again and notice it is always 2025. The underlaying data should preserve this information.

I also don’t understand why simple dates like “2025-03-14” cannot be parsed, as these are parsed correctly with momentjs.

Hi @anthony.agostino

I’m not sure if that should be treated as a bug. You are not providing the year value so there is no place where it can really be stored, that’s why it resets to the current year.

As for the second issue, when I provided the schema for such format it works fine: Handsontable Basic Example (100x10) - JSFiddle - Code Playground

1 Like