Date is off by one day after accessing wjcCore.CollectionView

Posted by: moritz.neugebauer on 13 October 2020, 7:42 pm EST

  • Posted 13 October 2020, 7:42 pm EST

    Dear Wijmo Team,

    I have an issue, where a date is off by one day after I access an item from CollectionView.

    A user enters a date into a cell that is from type date, e.g. 20991226.

    The output is:
    this.flexdata.selectedItems[0].date: Sat Dec 26 2099 00:00:00 GMT+0100 (Mitteleuropäische Normalzeit)

    But when I send the changed item to the server, the date of the item from sourcecollection is:

    for (let i = 0; i <; i++) {
    let tmpItem =[i];
    if (!tmpItem['id'] && tmpItem['guid']) {
    let convertedItem = Utils.convertFromNative2Katalogwert(tmpItem, this.katalogAttributeMap);


    Is there a place where a transformation happens internally?
  • Marked as Answer

    Replied 14 October 2020, 8:12 pm EST

    Hi Mortiz,

    It seems that when the date is sent to the server, the browser itself is converting the date to the previous date. Even the inbuilt JS methods like toISOString are also converting the dates to the previous day.
    If you can, you may convert the dates to UTC value by using the date.getTime method. It will send the date in milliseconds and you can store it as it in the server. But, you will need to convert the milliseconds back to date before adding them to the flexgrid.

Need extra support?

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

Learn More

Forum Channels