Opened 15 years ago

Closed 15 years ago

#3080 closed bug (fixed)

Datepicker calls _setDateFromField on a div when inline

Reported by: anonymous Owned by: grabanski
Priority: major Milestone:
Component: ui.datepicker Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


When you have an inline datepicker and set it's date from .datepicker('setDate') immediately after instantiating it, the datepicker('getDate') function will return null until a date is manually selected. I think I tracked this down to line 275-276 where the _getDatePicker function calls _setDateFromField. By adding an extra check to see if the datepicker is a div before trying to call _setDateFromField I fixed it for my needs, but it might be a bit hackish...

Revised it looks like this

ui.datepicker.js lines 275 and 276

if (inst && ($(target).get(0).tagName != 'DIV'))

Change History (1)

comment:1 Changed 15 years ago by kbwood

Resolution: fixed
Status: newclosed

Fixed - _setDateFromField is not called if the datepicker is inline.

Note: See TracTickets for help on using tickets.