Copy codeThe Code is as follows:
<Script type = "text/javascript">
$ (Function (){
Var options = {
ChangeMonth: true, // display the month drop-down box
ChangeYear: true, // display the year drop-down box
FirstDay: 0, // index on the first day (before Sunday) (index from Sunday to Saturday: 0 ~ 6)
ShowOtherMonths: true, // display the date of another month
ShowMonthAfterYear: false, // The year drop-down box is placed before or after the month drop-down box.
PrevText: "last March January", // prompt text for redirecting TO THE PREVIOUS PAGE
NextText: 'August 11', // The prompt text to jump to the next page.
StepMonths: 2, // every time you click "last month" or "next month", move for 2 months
NavigationAsDateFormat: true,
ShowCurrentAtPos: 3, // offset of 3 months from the current month
ShowOn: 'both ',
// MinDate/maxDate/hideIfNoPrevNext is a group
MinDate: '-10 ',//
MaxDate: '35 ',
HideIfNoPrevNext: false, // It is said that prev and next are prohibited and must be used with maxDate and minDate.
// DefaultDate: 2, // set the current date
GotoCurrent: true,
NumberOfMonths: 2, // display 2 months at a time (2 calendars)
YearRange: '2014: 2009 '// display the available year
};
// Initialize the date Control
$ ('# DatePicker'). datepicker (options );
// Display the current date
$ ('# DatePicker'). datepicker ('getdate ');
// Set the current date
$ ('# DatePicker'). datepicker ('setdate', '+ 1 m + 1d ')
})
</Script>