jQuery UI Widgets › Forums › Grid › Jqwidget grid date column displays different datetime
This topic contains 6 replies, has 3 voices, and was last updated by Dimitar 9 years, 11 months ago.
-
Author
-
HI we use the jqwidget grid in our application and we used the date column in jqwidget grid.initially when we developed the application we had our system calender time zone as chennai ,Kolkotta time zone which displays the date time record same as in db .once i changed the local time zone to central america zone the data from server is different from what it shows in UI.
I have replicated the issue same in jsfiddle as attached while running the jsfiddle example first run with chennai-kolkata as time zone and change your time zone to central america you and refresh the jsfiddle you can see the different date time in grid.
This application is live in production ,Please provide a solution as soon as possible to fix it.
http://jsfiddle.net/sGGZ3/287/Hello arunthatham,
You may use JavaScript Date Object(new Date(1988, 4, 23)) instead a String.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/actually we take the data from server with URL since to replicate the issue i did a client side implemenatation.
the data returned from server is of datetime and if this changes need to be done only in implementation please correct the jsfiddle and revert back.It would be very helpful if you could respond in JSfiddle as soon as possible.
Hi arunthatham,
Here is an example: http://jsfiddle.net/tdmvpkq4/. For more information about time zones you may look at the following forum topics: http://www.jqwidgets.com/community/topic/forma-date-by-time-zone/ and http://www.jqwidgets.com/community/topic/date-datafield-timezone-handling/.
I hope these resources are helpful to you.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/I think my question didn’t reach you properly.
My question is i get my data from server with datetime type in .Net and I assign to a column of date type in jqwidget.
The one of solution you provided is put column type like format: “yyyy-MM-ddTHH:mm:ss-HH:mm” but i need only date to be displayed in grid so i cant use this format.I can understand that java script object is doing this offset addition but we are not doing anything externally so you have to provide a solution to make that data to be displayed as same as what i get from server.
I didn’t ask for a jsfiddle example i already provided a example in my post,I asked for a jsfiddle with the solution.
Please help US!!!Hi arunthatham,
The format specified in the source datafields definition, i.e.
{ name: 'SubmitDate', type: 'date', format: "yyyy-MM-ddTHH:mm:ss-HH:mm" }
is used when getting the data from your data source. It has nothing to do with how the data is formatted in the grid cells (specified by the column cellsformat). Please try our suggested solution.Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.