Opened 12 years ago

Closed 8 years ago

#6224 closed bug (patcheswelcome)

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:


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:

		      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);

Change History (3)

comment:1 Changed 10 years ago by Scott González

Milestone: TBD1.11.0

comment:2 Changed 10 years ago by mikesherov

Status: newopen

Sounds like a bug in accounting for DST.

comment:3 Changed 8 years ago by Scott González

Resolution: patcheswelcome
Status: openclosed

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.

Note: See TracTickets for help on using tickets.