Set UTC date in jQuery UI Datepicker -


i have snippet:

var _datepicker = $(this); // inside cycle _datepicker.datepicker("setdate", new date(_datepicker.data("defaultdate"))); 

and works ok, problem data("defaultdate") in utc format, when calendar shows date, showed using timezone of pc, date wrong.

i've read code of datepicker ui code jquery, , cannot find anyplace fix that. there way it?

adding debug information

console.log((new date(_datepicker.data("defaultdate"))).getutcdate(), _datepicker.attr("id")); console.log(new date(_datepicker.data("defaultdate")), _datepicker.attr("id")); 

for date: 1380844800000

the first 1 show 4 (which correct), in mexico tz second 1 shows:

date {thu oct 03 2013 19:00:00 gmt-0500 (cdt)} start_picker 


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -