Skip to content

MinMonth Option

Benjamin Albert edited this page Feb 4, 2016 · 2 revisions

Type: Date or Number or String
Default: null
Since: 2.6
The minimum selectable month. When set to null, there is no minimum.

Multiple types supported:

  • Date: A Date object containing the minimum 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, 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.

Disables past months upon init.

$('.selector').MonthPicker({ MinMonth: 0 });
Get or set the option, after init.
//getter
var minMonth = $('.selector').MonthPicker('option', 'MinMonth');

// Set's the minimum selectable month to one year and three months
// from today.
$('.selector').MonthPicker('option', 'MinMonth', '+1y +3m');