Skip to content

Latest commit

 

History

History
executable file
·
27 lines (15 loc) · 875 Bytes

month-date-picker-usage.md

File metadata and controls

executable file
·
27 lines (15 loc) · 875 Bytes

Home / MonthDatePicker

MonthDatePicker

This widget allows you to select a calendar month.

MonthDatePicker is intrinsically a div element and accepts all of its attributes.

Usage

import { MonthDatePicker } from "react-simple-widgets/dist/month-date-picker";

<MonthDatePicker value validator onChange />;
  • value: string

    The selected date of the widget in the format YYYY-MM.

  • validator?: (date: string) => string

    If specified, the selected date is passed to this function to validate. This function should return a string error message or null if no error. If an error message is returned, onChange is not called with the selected date.

  • onChange: (date: string) => void

    This function is called with the selected date when the calendar date is clicked on. The day part of the date is always set to 01.