Search and Top Navigation
#6224 closed bug (patcheswelcome)
Opened October 25, 2010 12:49PM UTC
Closed June 24, 2014 11:37PM UTC
datePickers windows ticks returns wrong date.
Reported by: | anderstp | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.datepicker | Version: | 1.8.5 |
Keywords: | ticks | Cc: | |
Blocked by: | Blocking: |
Description
When using the windows format in the datepicker specified by the dateFormat : '!' the correct date is set upon initialization - but when a user selects e.g the 24 december 2009 the calender returns 633972060000000000 in ticks that translates into 12/23/2009 11:00:00 PM whan using windows (see below)
jquery datepicker initialization:
$('#datepicker').datepicker({ firstDay: 1, showOn: 'both', selectWeek: true, dateFormat: '!', defaultDate: '<%=activePeriodStartDate.Ticks%>', onSelect: function(selectedDate) { document.location.href = '_SetActiveDate.aspx?ticks=' + selectedDate; } });
}
ASP.NET C# code:
string ticks = Request["ticks"]; long lTicks; long.TryParse(ticks,out lTicks); DateTime tmpDate = new DateTime(lTicks);
Attachments (0)
Change History (3)
Changed October 11, 2012 09:04PM UTC by comment:1
milestone: | TBD → 1.11.0 |
---|
Changed October 18, 2012 06:24PM UTC by comment:2
status: | new → open |
---|
Sounds like a bug in accounting for DST.
Changed June 24, 2014 11:37PM UTC by comment:3
resolution: | → patcheswelcome |
---|---|
status: | open → closed |
The datepicker rewrite won't support Windows ticks, but if someone wants to send a PR with a fix prior to the rewrite landing in master, we can review it.