-
Notifications
You must be signed in to change notification settings - Fork 76
SelectedMonth Option
Benjamin Albert edited this page Feb 4, 2016
·
3 revisions
Type: Date or Number or String
Default: null
Since: 2.8
Set the selected month. When set to null nothing is selected.
Multiple types supported:
- Date: A Date object containing the selected month.
- Number: A number of months from today. For example 2 represents two months from today and -1 represents the last month.
-
String: A string in the format defined by the MonthFormat option option, or a relative month.
Relative months must contain value and period pairs; valid periods are "m" for months, and "y" for years. For example, "+1y +3m" represents one year and three months from today.
Set the option upon init.
$('.selector').MonthPicker({ SelectedMonth: 0 });
Get or set the option, after init.
//getter var minMonth = $('.selector').MonthPicker('option', 'SelectedMonth'); // setter $('.selector').MonthPicker('option', 'SelectedMonth', '+1y -3m');