jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid Date Display Issue

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxGrid Date Display Issue #57624

    yougotnet
    Participant

    I have a grid to display a date, in my json (you can see the results below) the enrollmentdate show 2014-07-25 but when the grid is displayed all the dates in this column are minus 1 day and shows 07/24/2014.

    It seems that it is applying timezone calculations; how do I stop this?
    The grid should only display what is in the json record.

    `[{“mth”:”8″,”yr”:”2014″,”rscwritingno”:”SA178″,”rscname”:”GUIDI, JUSTIN M”,”dscwritingno”:””,”dscname”:””,”writingno”:”SA178″,”assocname”:”HQGUIDI, JUSTIN M”,”groupno”:”EVH75″,”groupname”:”BRAK BROS LLC DBA SERVPRO”,”opstatus”:”Open”,”empmetdate”:null,”empmethow”:null,”referrals”:”0″,”emunsuccessful”:null,”empunsuccessfulother”:””,
    “enrollmentdate”:”2014-07-25″,
    “hasgroupproducts”:”0″,”seen”:”0″,”sold”:”0″,”totalap”:”0″,”cooperation”:”Good”,”cis_empcount”:”0″,”cis_contactname”:””,”cit_phone”:null,”lastupdatedby”:”SA178 Justin M Guidi”,”lastupdated”:”2014-07-22 22:32:00″,”months_inactive”:”17″}]’

    {text: ‘Enrollment Date’, datafield: ‘enrollmentdate’, hidden: false, width: 70, cellsalign: ‘center’, align: ‘center’, cellsformat: ‘MM/dd/yyyy’, renderer: columnsrenderer, columngroup: ‘ERActivity’},

    jqxGrid Date Display Issue #57627

    Peter Stoev
    Keymaster

    Hi yougotnet,

    This is due to the fact that your Server Dates do not include Time Zone and JavaScript Date object turns your Strings into the Local Time Zone. That is how the JavaScript Date object works. If your Date Strings were full, the Time Zone would be correct and you won’t have a difference in the Date display. If you would like, you can read about TimeZones here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date and in other forum posts.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.