Date format Changes - mm/dd/yyy to dd/mm/yyyy on clicking outside the cell

Posted by: johina.olla on 10 January 2023, 1:13 am EST

  • Posted 10 January 2023, 1:13 am EST - Updated 10 January 2023, 1:51 am EST

    We are using the spreadjs v15 in angular application and facing the date input issue in spreadsheet. Whenever I enter the date in the format - mm/dd/yyy, upon clicking anywhere outside of that specific cell, it changes to the format - dd/mm/yyyy (cells D4 and D5).

    But when I enter the date in the format - dd/mm/yyyy (as shown in the video in cell D6), the date stays the same and gives error upon saving as now it is considering 30 as month and that does not exist.

    Spreadsheet is expecting the date in the format mm/dd/yyyy and later changes to another format. I have tried to change my system date format to mm/dd/yyy but it is still behaving the same.

    I would like to enter the date in the format - dd/mm/yyyy and that it stays the same and would like to know if this something related to spread and is there any fix available?

    Note - it is behaving the same way upon copy pasting the date.

    Thank You

  • Posted 11 January 2023, 3:30 am EST

    Hi,

    This is expected actually your requirement conflict with our formatting strategy.

    The same with excel, the editing format could not be customized by the user, it follows the current culture, using shortDatePatttern or shortDatePattern + longTimePattern.

    Further, Please refer to the following sample that demonstrates a workaround to fix this issue.

    sample: https://codesandbox.io/s/upbeat-http-tnqcq?file=/src/index.js:920-971

    regards,

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels