How to enable months view in date picker material ui - javascript

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.

Related

ReactJS Ant Design - Use Range Picker as Multi Month View with Single date selection

I have a requirement of implementing Multiple Month View which shows two months calendar side by side exactly like RangePicker but to be able to choose only single date, not a range.
I have made a Sandbox
If anyone has worked on such solution, please help.
Thanks.
I worked on something similar recently. I made an override to the Ant CMS for the range selection blue background. I just kept the styling for the dates that are clicked, and I just kept the two selected dates instead of the entire range.
It's a hack, but it worked fine and I've yet to run into any issues with it.
Set allowEmpty={[false, true]} disabled={[false, true]}
Demo

fullcalendar Month View Issues

I'm trying to use FullCalendar in my new project but I can't find any information on how to do what I want. Has anyone done something similar or have any idea on how I can achieve this? My aim is to have a Month View of the calendar like this:
However, what ever I've tried I couldn't make the 2 slots visible in the Month View.
What is displayed within those 2 slots? You will probably have to make your own custom view for this.
https://fullcalendar.io/docs/custom-views

How can i create a calendar with customization days using Reactjs?

i'm a reactjs beginner, i want to create a Calendar using ReactJS in range two days, but i want to divide the squares of days two three shifts or divs each shift/div can be clickable. Like this picture.
I Tried React-Big-Calendar, Calendar, and React-Calendar but no one of them can give me what i want, anyone can help me?
You can use React-Component Calendar and return div in dateRender

Bootstrap Calendar order of events in week view

I have a high interest in creating my own event calendar/scheduler for my site and found Bootstrap Calendar, it has real potential. I looked at dhtmlxScheduler but its hard to customize the look, it has a lot of nice features though. I have a Fullcalendar now and I like the new Scheduler but I still want a more custom look and some custom functionally.
My JS/Jquery is limited so it makes it difficult to get a real picture of BS-Cal layout and unfortunately there seems to be little documentation other than comments in the code.
So my issue with BS-Cal is the event ordering/stacking in the week view.
The Question - Can the events be reordered in a per day list like the 2nd photo below.
So far - I see the offset class for the columns and the events but the events seem to be wrapped in a "row" div which forces a single "list" for the whole week rather than per day placement order left to right on the table.
Here is what I believe is happening:
This is what I'm hoping to accomplish:

Angularjs & bootstrap Datepicker, disable dates dynamically

I need to implement the following:
2 Datepickers with 2 consecutive months. The user can select a start- and an end-date.
Here is the tricky part that I can't figure out:
After selecting the start date I must enable/disable various dates.
From what I understand the disabled date are only fired once and the min-max only lets me select one range. However I need to disable/enable a multitude of dates.
I am very new to angular so I can't quite make heads or tails of the source yet.
I hope this is clear enough.
Also open to suggestions for a different datepicker directive that let's me do this. (Needs to able to default to open)

Categories

Resources