Bug Tracker

Modify

Ticket #2395 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

jQuery UI/Datepicker 3.3 - .datepicker('getDate') doesn't work

Reported by: adsmart Owned by: paul
Priority: undecided Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: datepicker ui 3.4 Cc:
Blocking: Blocked by:

Description

The recent updates to DatePicker are flawed in a few ways.

The new $.fn.datepicker function is calling deprecated functions by using:

this[option + 'DatePicker'].call(this, args)

Unfortunately, that doesn't work for getDate and SetDate since the functions there are

$.fn.getDatepickerDate $.fn.setDatepickerDate

clearly this doesn't fit with the model.

Secondly, implementing the new API by calling out to the old, deprecated API is a very bad idea. Its going to make it that much more difficult to retire the old interface. The implementations should all be internal to $.fn.datepicker and the old API should call it.

You can test this by taking the demo that comes with the jQuery UI bundle and simply calling .datepicker("getDate');

Change History

comment:1 Changed 5 years ago by kbwood

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

Fixed in the latest version.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.