var $fooText = $("#foo");
var $barInt = $("#bar")
$fooText.datetimepicker({timezone: "+0000"});
$("#get").click(function () {
var date = $fooText.datetimepicker("getDate");
console.log(date);
$barInt.val(date.getTime());
});
$("#set").click(function () {
var date = new Date(parseInt($barInt.val()));
console.log(date);
$fooText.datetimepicker("setDate", date);
});
$fooText.datetimepicker("setDate", new Date());
When try to set date with timezone provided, the datetimepicker won't work.
The following example is expected to have same text and int after click 'get' and 'set' buttons many times, however is won't work for current version.
HTML Part:
Javascript Part:
Check here: http://jsfiddle.net/28tGW/4/
My temporary fix (for 18de616243dae142bcef4c7bcbe050348454ca57) is done by
However, you don't want merge it directly ;)