MonthPicker
Description
A control to select a year and month
MonthPicker lets users select a specific year and month using the browser's native month-input widget. It is ideal when day-level precision is unnecessary, such as selecting billing periods, report months, or subscription renewal dates.
The component surfaces the selected value as a typed (year, month) tuple, removing the need for manual string parsing.
API reference
public class MonthPicker : MomentPickerBase<MonthPicker, (int year, int month)>A form input for picking a single calendar month (year + month), backed by the browser's native month input.
- Namespace
- Tesserae
- Inheritance
- MomentPickerBase<MonthPicker, (int year, int month)> → MonthPicker
Constructors
| Name | Description |
|---|---|
| MonthPicker | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| Month | Gets or sets the month. |
Methods
| Name | Description |
|---|---|
| WithBrowserFallback | Adds the pattern attribute to the underlying input element for graceful degradation when retrieving the user selected value on older browsers. |
Samples
Basic MonthPicker
With Min / Max Constraints
Interactive Selection with Live Feedback
This sample displays the most recently selected month and a running count of changes, demonstrating how OnChange can drive any downstream UI such as report filters or billing-period summaries.