I'm currently making a date-picker using Material UI in REACT. I'm struggling to find a solution where I can click on the month label/text that will make it show months only.
I can make it show the desired view of months only if i add views={["month"]} prop to the component.
check this codesandbox https://codesandbox.io/s/8gpxl
If you add views={["month"]} as prop in the component. You will see that it has my desired effect/view. However i'm struggling to find a way i can switch to this view on click of months text.
So in the codesandbox where the datepicker is displayed. I would like to click on 'August 2014' which will then make the views={["month"]}
I've tried searching the documentation thoroughly and still can't find a solution. I can't use onChange as that's specifically handling the date, i've tried/thought of doing onClick but that will make it apply to whole component rather than the month label.
I can't seem to find a solution to do it however i feel like it's possible because on the second datePicker in the codesandbox where it doesn't have prop disableToolbar. If you click on the year 2014, it then toggles the whole datePicker view to the years. I need it do the same for months when i click on August 2014. So it does seem possible, just need a little help figuring out how.