Components
MonthYearPicker
MonthYearPicker allows selecting a month and year, or choosing "Beyond" / "I'm not sure". Auto-advances to the next step when both month and year are selected.
Usage
Best practices
valueis a union - aDate,"beyond", or"unsure"- so branch on the string sentinels inonChangebefore treating it as a date.Enable the "I'm not sure" escape hatch with
showUnsure(off by default);"unsure"/"beyond"only ever arrive when their toggles are shown.Bound the range with
yearsAhead(from the current year); it auto-advances and commits once both month and year are chosen, so don't add your own "next" control.
Props
Also exports
- interface
MonthYearPickerProps - type
MonthYearPickerValue