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

<DateRangePicker
    onChange={onChange}
    value={value}
    maxDetail="month"
    calendarIcon={null}
/>

but it is opening up in the "day" view

enter image description here

instead of the "month" view

enter image description here

17 thoughts on “Cannot Open Up in "Month" View using react-daterange-picker”

Leave a Comment