Kendo Scheduler Month view to start 24th and end on 23 of following month

1 Answer 97 Views
Scheduler
MIDAS
Top achievements
Rank 1
Iron
Iron
MIDAS asked on 11 May 2023, 07:24 PM | edited on 11 May 2023, 07:46 PM

Hi, we have a requirement to customise the month view of the scheduler. We are developing a system for users to log their on-call hours and overtime. Our pay month starts on the 24th through to the 23rd of the following month. 

Is there a way customise the month view so that if Jan is selected it displays from Jan 24th through to Feb 23rd... if Feb is selected it displays from Feb 24th to March 23rd etc.

When viewing a month any dates outside the range should be disabled so for example if viewing May 2023 where May 24th is a Wednesday and the week begins on Mondays then May 22nd and 23rd would be disabled and as Jun 23rd is a Friday June 24th and 25th would be disabled.

Many thanks

Attached are examples I was able to do using FullCalendar JS by AR Shaw but I would prefer to use Kendo.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 16 May 2023, 11:19 AM

Hello,

The Scheduler does not allow changing the month view to start with a certain date, however, disabling some dates is possible.

This can be achieved with custom logic in the edit event handler:

edit: function(e){
            if(e.event.start.getDate() == 1 || e.event.start.getDate() == 2 || e.event.start.getDate() == 3 || e.event.start.getDate() == 4 || e.event.start.getDate() == 5 || e.event.start.getDate() == 6 || e.event.start.getDate() == 7 || e.event.start.getDate() == 8 || e.event.start.getDate() == 9 || e.event.start.getDate() == 10 || e.event.start.getDate() == 11 || e.event.start.getDate() == 12 || e.event.start.getDate() == 13 || e.event.start.getDate() == 14 || e.event.start.getDate() == 15 || e.event.start.getDate() == 16 || e.event.start.getDate() == 17 || e.event.start.getDate() == 18 || e.event.start.getDate() == 19 || e.event.start.getDate() == 20 || e.event.start.getDate() == 21 || e.event.start.getDate() == 22 || e.event.start.getDate() == 23   ){
              alert('Disabled')
              e.preventDefault()
            }
          }

Dojo demo: https://dojo.telerik.com/UCoTIpAh

Please let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
MIDAS
Top achievements
Rank 1
Iron
Iron
commented on 18 May 2023, 02:41 PM

As our employees are paid on the 24th of each month, our pay claim month runs from the 24th of one month to the 23rd of the following month. I was hoping that the scheduler could be altered so that a view showed all these dates as if they were a single month similar to what I was able to do using Full Calendar. Thanks 
Nikolay
Telerik team
commented on 23 May 2023, 08:05 AM

Hi,

If this feature is important for you I suggest submitting a feature request in our Feedback portal. The ones that gain popularity are usually included in the RoadMap for implementation.

Regards,

Nikolay

Tags
Scheduler
Asked by
MIDAS
Top achievements
Rank 1
Iron
Iron
Answers by
Nikolay
Telerik team
Share this question
or