tags:

views:

24

answers:

1
$(function() {
    $(".datepicker").datepicker({
        dateFormat: 'mm-dd-yy',
        yearRange: 'c-70:c+10',
        changeYear: true,
        changeMonth: true,
        numberOfMonths: 3,
        showWeek: true,
        firstDay: 1,
        showOn: 'button',
        buttonImage: "/images/scw.gif"; ?>',
        buttonImageOnly: true
    });
});

<input type='text' name='from_date' id='from_date' class='datepicker'>
<input type='text' name='to_date' id='to_date' class='datepicker'>
+1  A: 

Edit: Is this the only instance of .datepicker invocation in your script? Are there any calls? Is this using a custom locale thats not en? Do you have a link?

Are you sure its not yyyy instead of yy?

meder
`mm-dd-yy` is the correct format for a full year: 2010, etc: http://docs.jquery.com/UI/Datepicker#option-dateFormat
Doug Neiner
yeah, updated with more questions.
meder
Looks like it was a caching issue since the data is on a remote server. Thanks for the answer it really is correct as yy.
Hector Lucero