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

class

MonthPicker

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

NameDescription
MonthPickerInitializes a new instance of this class.
Constructor
MonthPicker
public MonthPicker((int year, int month)? monthAndYear) : base("month", monthAndYear.HasValue ? FormatMonth(monthAndYear.Value) : string.Empty)

Initializes a new instance of this class.

Properties

NameDescription
MonthGets or sets the month.
Property
MonthPicker.Month
public (int year, int month) Month

Gets or sets the month.

Methods

NameDescription
WithBrowserFallbackAdds the pattern attribute to the underlying input element for graceful degradation when retrieving the user selected value on older browsers.
Method
MonthPicker.WithBrowserFallback
public MonthPicker WithBrowserFallback()

Adds the pattern attribute to the underlying input element for graceful degradation when retrieving the user selected value on older browsers.

Returns

The current instance of the type.

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.

See also

© 2026 Curiosity. All rights reserved.