I noticed something strange this morning while trying to troubleshoot an issue with data loaded into a grid from mysql. The dates in the date column of my grid are one day earlier than what the dates are in mysql. This would explain why the dates I see in the grid are one day earlier than the date I pass as a parameter.
Is this something I need to set in the dataAdapter? Could it be a formatting issue?
I just noticed the same behavior with the calendar widget. I call a function to get the most recent date from my database. The function returns ‘2013-03-01’ in startdate. I set the value and setDate in the calendar using
$("#jqxcalendar").jqxCalendar({ width: '240px', height: '220px', value: $.jqx._jqxDateTimeInput.getDateTime(new Date(startdate))});
$("#jqxcalendar").jqxCalendar('setDate',new Date(startdate));
and the date that is selected is February 28. One day earlier.
Please advise and thank you for your time!
EDIT: Live and learn. I found another post here about the same problem, and after reading about formatting the fields, I added that to my code as in { name: 'date', type: 'date',format: "yyyy-MM-dd"},
and that fixed the dates in my grid. I still have the problem with my calendar though.