views:

35

answers:

1

I must be missing some setting or something, but when I use the back button the datepicker jumps to 1899 from the current year.

Has anyone else seen this and fixed it?

(You can see the different combos I've commented out.)

    $('.dialog-search,#from')
   .datepicker({
    defaultDate: 'c-1m',
    dateFormat: 'yymmdd',
    //changeMonth: true,
    changeYear: true,
    showAnim: 'fadeIn',
    duration: 200,
    //gotoCurrent: true, 
    showOtherMonths: true,
    selectOtherMonths: true,
    currentText: 'Now',
    shortYearCutoff: '+20',
    //showWeek: true,
    //firstDay: 1,
    numberOfMonths: 1,
    showButtonPanel: true,
    yearRange: 'c-200:c',
    onSelect: function(selectedDate,inst) {
     $('.dialog-search,#from').val(selectedDate);
    }
   });
A: 

I have created a demo with your code in jsfiddle and I can't reproduce your problem. Can you check it at http://jsfiddle.net/w78xX/.

Rubens Mariuzzo
You are correct - it works fine there. It must be something deeper in the code that launches the dialog that contains the datepicker. I've seen some other people complain about this, but I can't find an answer or any hints about what could be causing this issue.
patrick-api
Patrick-api, can you post your entire code? Maybe I can help you.
Rubens Mariuzzo