$(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'>
views:
24answers:
1
+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
2010-06-17 03:41:17
`mm-dd-yy` is the correct format for a full year: 2010, etc: http://docs.jquery.com/UI/Datepicker#option-dateFormat
Doug Neiner
2010-06-17 03:47:30
yeah, updated with more questions.
meder
2010-06-17 03:47:49
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
2010-06-17 03:49:12