Opened 9 years ago

Closed 9 years ago

#9810 closed bug (invalid)

_formatDate function returns invalid Date object when called from within _setDate function

Reported by: rohel Owned by: rohel
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

jquery.ui.datepicker.js v1.10.3:

when calling _formatDate function from _setDate function, the only parameter passed to _formatDate is inst:

inst.input.val(clear ? "" : this._formatDate(inst));

in _formatDate function, the date object is created, but there is a bug, while calling: daylightSavingAdjust function. the undefined hour parameter is passed to _daylightSavingAdjust function, instead of inst.currentHour

		var date = (day ? (typeof day === "object" ? day :
			this._daylightSavingAdjust(new Date(year, month, day, b12HrTime ? this.evalAmPm(ampm, hour) : hour, minute, second))) :
			this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay, b12HrTime ? this.evalAmPm(ampm, inst.currentHour) : hour, inst.currentMinute, inst.currentSecond)));

see this part: b12HrTime ? this.evalAmPm(ampm, inst.currentHour) : hour

Change History (2)

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

Component: ui.widgetui.datepicker
Owner: set to rohel
Status: newpending

Please provide a reduced test case that shows the problem.

comment:2 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.