Skip to content
Advertisement

Cannot Open Up in “Month” View using react-daterange-picker

How can we set DateRangePicker from the @wojtekmaj/react-daterange-picker package to show only months (i.e. like a month picker) when the component is first clicked?

Tried using

JavaScript

but it is opening up in the “day” view

enter image description here

instead of the “month” view

enter image description here

Advertisement

Answer

Your DateRangePicker options maxDetail value should be “year” instead of “month”.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement