Hello Denis,
I implemented your solution, Its not working for me. The following was the result I was getting BEFORE implementing your soultion:
The date on the server is : 2014-11-12 00:00:00.000
The date in the grid is : 11/11/2014 _7:00 PM
(12th date becomes 11th)
After I implemented your sample project I get a completely wrong date, I cant figure out the implementation details of your formatToServerTimeZone(date) function, is it specific to Pennsylvania? Are Daylight Savings setting different for every region ? Then this would be a problem. I dont want to hardcode the daylight saving settings. The following line does not make sense to me and if I have to modify it according to my region then this would become region specific, I dont think there is Daylight Saving in my country right now so what should be the setting?
Also one more thing.
I have a form (Master) also above the grid (Detail) . The same date 2014-11-12 00:00:00.000 from server is loaded in the form's datePicker and the date is displayed correctly like this : 11/12/2014
There is an event bound to this datePicker, on its selection changed event, the date of this (master's) datePicker is used to set the date in my Grid (detail). And the date 11/12/2014 becomes 11/11/2014 _7:00 PM . And if I commit the data the server's date also becomes 11/11/2014 00:00:00.000 BUT if I use the datePicker inside the grid (detail) and select 11/12/2014 then the correct date is displayed in the grid as well as on committing the row the server's date becomes 2014-11-12 14:00:00.000 and is displayed correctly next time in the grid.
From what I understand is that if I change the grid's date column through my master's datePicker, the date becomes one day behind, If I set the date through the grid's columns datePicker the date displays alright and the server also stores it correctly.
var date = $("#voucherPartyRefDate").igEditor("value"); // get date from master's datePicker
$("#voucherDetailGrid").igGridUpdating("updateRow", detailHeaderPk, { //set date of detail(grid's) datePicker
vchr_dtl_ref_dt: date
}
———————————–
If this is messing up the date than what should be done ? Is there another way to set the date of grid date column based on the date selected from master's igDatePicker?
Thanks.