I am having standard jQuery UI datepicker like this:
$('.text_input').live('focus', function () {
$(this).datepicker('destroy').datepicker({dateFormat: 'dd.mm.yy'});
});
In the input is already date, e.g. 14.7.2010. When I click the input, datepicker appears and it shows selected date filled in input. However, when I try to navigate using left and right arrows at the top of the datepicker, strange thing happens – it changes date in datepicker to November 1899 or January 1900, depending which arrow I click.
Anybody has any idea why is this happening ? And how to fix it ? I am using jQuery UI 1.8.14 and jQuery 1.4.2.
Don’t destroy it. 🙂