jquery - how to set the default year selected as our current year today? -
I have a datepicker of jquery, but the problem is, what is being displayed is the year that I set Am I 1940, then how to set the current selected year as our year-to-day, 2011?
Here is my code
$ (function () {$ ('# datepicker') Datepicker ({changeyear: true, changeMonth: true, yearRange: '1940: 2010}}}}}
There is an option in:
// Setter $ (".selector"). Data Taxes ("Options", "Default Date", +7); This is what was said on the jQuery site Is:
Set the date of highlighting when the field is open first, as a string in a date object or current date format, or Number of days of h (eg, +7) or a string of values and periods ('Y' for the year, 'm' for months, or 'w' for the week, 'd' for the day, '+ 1m + 7d'), or weak for today.
Comments
Post a Comment