Skip to main content

Search and Top Navigation

#9810 closed bug (invalid)

Opened February 11, 2014 10:00AM UTC

Closed February 26, 2014 08:53AM UTC

_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

Attachments (0)
Change History (2)

Changed February 11, 2014 04:25PM UTC by scottgonzalez comment:1

component: ui.widgetui.datepicker
owner: → rohel
status: newpending

Please provide a reduced test case that shows the problem.

Changed February 26, 2014 08:53AM UTC by trac-o-bot comment:2

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!