SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Apr 2007
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery Datepicker create event does not work?

    I would like to access the create call back function. So far no luck. It appears the function is not getting executed. Any ideas where I may be going wrong?

    Code:
    $('input.datepicker').datepicker({
            create: function(){ alert('created!'); }
    });

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by semantic7 View Post
    I would like to access the create call back function. So far no luck.
    From my brief reading on the subject, it seems that the create event is available to things that are created via the widget factory.

    I don't think that the datepicker uses the widget factory yet.
    http://bugs.jqueryui.com/ticket/6228

    Aha! Confirmation from the author of datepicker
    http://wiki.jqueryui.com/w/page/12137778/Datepicker

    Future development includes:
    Refactor the code to use the widget factor and follow the jQuery UI API
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Addict
    Join Date
    Apr 2007
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by semantic7 View Post
    Thanks Paul.
    The same development page from the author does also link through to a refactored development version of datepicker, which uses the widget factory.

    You can find it over at: https://github.com/kbwood/jquery-ui
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •