1.13.96 • Published 2 years ago

@myntra/uikit-component-input-month v1.13.96

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

import InputMonth from './src/input-month'

InputMonth

const [value, setValue] = useState({ month: 2, year: 2019 });

<InputMonth value={value} onChange={setValue} />

Sub-components

InputMonth.Picker

const [value, setValue] = useState({ month: 2, year: 2019 });

<InputMonth.Picker value={value} onChange={setValue}  />

InputMonth with configurable year field

const [value, setValue] = useState({ month: 2, year: 2019 });

<InputMonth value={value} onChange={setValue} maxDate={(new Date('2022-01-01'))}/>
const [value, setValue] = useState({ month: 2, year: 2019 });

<InputMonth value={value} onChange={setValue} maxDate={(new Date('2052-01-01'))} minDate="2014-01-01"/>