Spread V11: double clicking a date cell shows date integer instead of a date

Posted by: viswanath.malepati on 9 July 2018, 7:55 pm EST

    • Post Options:
    • Link

    Posted 9 July 2018, 7:55 pm EST

    Hi,

    When we try to double click a date cell, it shows date integer instead of a actual date in edit mode.

    We are trying to set a cell format to date format “M/d/yyyy” and then set cell value as “43435”. Now cell text will be 12/1/2018.

    Then when we double click we see the integer 43435 in edit mode instead of 12/1/2018.

    Steps to reproduce:

    • Open SpreadV11.html from attachment. Double click cell 0,0, notice 43435 instead of date in edit mode

    • Open SpreadV9.html from attachment. Double click cell 0,0, notice actual date in edit mode

    Thanks,

    Viswanath

    date_issue.zip

  • Posted 10 July 2018, 2:27 am EST

    Hello,

    When the formatter for SpreadJS 11 works like so:

    object (string,number,date,boolean…) → formatter.format method → string (display in cell)

    string → formatter.parse method → object (string,number,date, boolean, save in cell’s value)

    If you change the version 11 sample to the following you will see both work:

    sheet.getCell(0,0).formatter("m/d/yyyy");
    sheet.getCell(0,0).value(new Date(2018,11,1));
    sheet.getCell(0,1).formatter("m/d/yyyy");
    sheet.getCell(0,1).text("43435");
    

    -Alex

Need extra support?

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

Learn More

Forum Channels