Our powerful JS Calendar component


Post by vineet nayak »

Hello,

How do you make weekends read only? I don't want user to be able to create events on weekends. Also i would like weekends to not count as day range/part of event if possible.
Also is there a way i can have a list of dates(holidays) that will also be disabled/readonly?

Regards,
Vineet


Post by Animal »

In terms of allowing/disallowing creation of certain events to not start/end on certain times, there are validation functions which you can inject into the configuration which control this.

https://www.bryntum.com/docs/calendar/#Calendar/feature/CalendarDrag#config-validateCreateFn

And the two following functions for validating move and resize.

In terms of editing using the EventEdit feature, you can add validation to the fields in there by configuring them. You could add change listeners to the start and end date fields which mark the field invalid if you don't like the value.

https://www.bryntum.com/docs/calendar/#Scheduler/feature/base/EditBase#config-items


Post Reply