Chris W. Parker wrote:
Hello,
I'm trying to implement datePicker v2 but Firebug says
"$('#date').setStartDate is not a function". I must be missing something
simple because I can click "calendar" and have the calendar appear. So
it works, just not completely. Any ideas where I'm going wrong?

...

// datePicker v2 stuff
Date.firstDayOfWeek = 7;
Date.format = 'mm/dd/yyy';

$(document).ready(function () {

        // Kelvin Luck's datePicker v2
        $('#date').datePicker();
        $('#date').setStartDate('01/01/2006');

});

Hi,

It seems like you are looking for dpSetStartDate. In fact, to achieve what the code above does you can do this:

$('#date').datePicker({startDate:'01/01/2006'});

If you need to changed the start date after the date picker has been initialised for any reason (like for example in my "Start and end date pickers" example) then you will need to use dpSetStartDate like so:

$('#date').dpSetStartDate('01/01/2006');

Since the date picker methods are added to all jQuery methods I thought it polite to prefix them to avoid naming collisions with other plugins.

Ahh - I've just noticed that there was a typo in the documentation which is maybe why you got confused... I just fixed it ( http://dev.jquery.com/changeset/1930 ) and the documentation ( http://kelvinluck.com/assets/jquery/datePicker/v2/demo/documentation.html ) is now correct,

Thanks,

Kelvin :)

Reply via email to