-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
I tried the following code:
var periodInit = new Date();
periodInit.setHours(8, 30, 0, 0);
$("#periodentry").datetimepicker("setDate", periodInit);
var periodVal = $("#periodentry").datetimepicker("getDate");
console.debug(periodVal);
The selected time 08:30 is set correctly (3rd line) in the widget but I didn't succeed in getting the time value back from the field. The last line prints:
Thu Jan 20 2011 00:00:00 GMT+0100 {}
in the Firebug's console. Using periodVal.getHours() / periodVal.getMinutes() returns 0. I expect 8 and 30 respectively.
Here's how I initialize the timepicker:
$("#periodentry").timepicker({
ampm: false,
hourMin: 2,
hourMax: 16,
hourGrid: 2,
minuteGrid: 15,
stepMinute: 5,
});
Browser used:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0C)
Thanks,
PJ
Metadata
Metadata
Assignees
Labels
No labels