MonthPicker
A panel that displays all 12 months of the year and lets the user pick one. The month property reflects and controls the selected month (0-based, 0–11). The select event fires when the user picks a month, and titleClick fires when the panel's title (showing the current year) is clicked — useful for navigating to a YearPicker.
const monthPicker = new MonthPicker({
month : new Date().getMonth(),
appendTo : document.body,
onSelect({ value }) {
console.log('Selected month:', value);
}
});
Useful configs and events
| Config / Event | Description |
|---|---|
| month | The selected month (0-based, 0–11) |
| select | Fired when a month is selected |
| titleClick | Fired when the panel title is clicked |
See also
- YearPicker - Year selection panel
- DatePicker - Full date picker with day/month/year navigation
No results
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The month to use as the selected month (zero-based, 0-11). Defaults to the current month.
Has a corresponding runtime month property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of MonthPicker class, or subclass thereof.
-
The month to use as the selected month (zero-based, 0-11). Defaults to the current month.
Has a corresponding month config.
-
Identifies an object as an instance of MonthPicker class, or subclass thereof.