Few questions about what I want to achieve with this calendar. #207
-
Hello, you guys have done fantastic job with the calendar. I have following question. Is it possible to set global background event for calendar which say it is blocked to create event. So say if company has working hours from 9 am to 6 pm and break time is 1 pm to 2 pm? is it possible to disable dateClick for hours except working hours when in time grid or resource time grid view? Currently I am checking time on dateClick event and sending alert to user. Just wanted to know if there is any better way using some global busy event which might apply to all days or selected days.. If anyone can give suggestions or example to achieve above that would be great. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 19 replies
-
Hello, The calendar has a posibility to display background events. To do this, you should pass the dateClick: function (info) {
if (info.jsEvent.target.classList.contains('ec-bg-event')) {
// Click on a background event
} else {
// Click on an empty area
}
} |
Beta Was this translation helpful? Give feedback.
-
This is my code. First I am doing some complex adjusting stuff which is not that important for you. The thing is where the update function is been called, it just doesn't work. Removing/adding is no problem instead. `datesSet: function (info) {
|
Beta Was this translation helpful? Give feedback.
It looks like you need an option similar to businessHours from FullCalendar. Unfortunately, this option is not implemented in Event Calendar. But you can achieve the same result if you generate background events for each period for the required days of the week and time.