react-flatpickr
react-flatpickr copied to clipboard
is there a way to use monthSelectPlugin , this doesnot seems to work ?
<script>
import Flatpickr from 'react-flatpickr'
import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect';
import '@styles/react/libs/flatpickr/flatpickr.scss'
import 'flatpickr/dist/plugins/monthSelect/style.css'
</script>
<Flatpickr
value={selectedDate}
onChange={date => setSelectedDate(date[0])}
options={{
plugin: [
new monthSelectPlugin({
shorthand: true, //defaults to false
dateFormat: "m.y", //defaults to "F Y"
altFormat: "F Y", //defaults to "F Y"
})
]
}}
/>