Ticket #3080 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

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:
Blocking: Blocked by:

Description

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'))
    inst._setDateFromField($(target));

Change History

comment:1 Changed 6 years ago by kbwood

  • Status changed from new to closed
  • Resolution set to fixed

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

Note: See TracTickets for help on using tickets.