Subscribe to Jack of All Trades Web Development

jQuery UI Datepicker v3.4

JQuery, MyWork

jQuery UI Datepicker has been updated to v3.4 - view the v3.4 change log for a full list of changes.

Many functions have been renamed and will stay this way. There was much discussion around the API of the jQuery UI project. It was decided that the name of the plug in will be the main function and the first parameter will be the actions.

To migrate fully, the following steps need to be taken:

  • Replace attachDatepicker with datepicker.
  • Replace removeDatepicker() with datepicker('destroy').
  • Replace changDatepicker(...) with datepicker('change', ...).
  • Replace enableDatepicker() with datepicker('enable').
  • Replace disableDatepicker() with datepicker('disable').
  • Replace isDisabledDatepicker() function with datepicker('isDisabled').
  • Replace showDatepicker() function with datepicker('show').
  • Replace getDatepickerDate() function with datepicker('getDate').
  • Replace setDatepickerDate(...) function with datepicker('setDate', ...).

For example, this old style code:

$('inputs').attachDatepicker(...);
$('inputs').changeDatepicker(...);

becomes:

$('inputs').datepicker(...);
$('inputs').datepicker('change', ...);

I have come to love the new API - it fits with jQuery much better, don't you think?

Also, on the top of the datepicker documentation page you will notice links to legacy versions documentation for v3.2 and v3.3. That way if you don't need to migrate over to the new API right away you don't have to, while still having documentation.

Comments

  • #1. Richard D Worth on Feb 26 2008

    Great job Marc. I'm very impressed with your responsiveness (and patience) with all the API changes. Also, providing the legacy documentation is huge. Keep up the great work!

  • #2. Rey Bang on Feb 26 2008

    Awesome job Marc. The datepicker rocks :)

  • #3. Luke on Apr 16 2008

    Do you still intend to have the datepicker make use of the dateJs library? I think that would be a great way to reduce the size of the date picker code.

  • #4. Philip on May 10 2008

    Hi Marc

    I've been using this plugin since the early days - it just keeps getting smoother - many thanks for all your hard work.

    Are there any plans to implement a time element? Even as a text box or optional plugin hook would be fine. Just need to be able to populate datetime fields sometimes...

Post a Comment!