Dear Customer,
Greetings from Syncfusion Support.!!!
We have validated your share query “(Hours from 00:00 to 08:00 and from 11:00 to 16:00 and from 19:00 to 23:59 should be hidden)” at our end. And we suspect that your requirement is to hide/disable the selected timeslots. And we are not able to hide those timeslots but we can able to disable it. And for that, we have prepared a sample using actionBegin and popupOpen Scheduler events and the sample can be viewed from the following link.
Code snippet:
|
actionBegin: function (args) {
if (args.requestType == "eventCreate" || args.requestType == "eventChange") {
var data = ej.base.isNullOrUndefined(args.data[0]) ? args.data.StartTime : args.data[0].StartTime;
if ((data.getHours() >= 0 && data.getHours() <= 7) || (data.getHours() >= 11 && data.getHours() <= 15) || (data.getHours() >= 19 && data.getHours() <= 23)) {
args.cancel = true;
}
}
},
popupOpen: function (args) {
var data = ej.base.isNullOrUndefined(args.data.startTime) ? args.data.StartTime : args.data.startTime;
if ((data.getHours() >= 0 && data.getHours() <= 7) || (data.getHours() >= 11 && data.getHours() <= 15) || (data.getHours() >= 19 && data.getHours() <= 23)) {
args.cancel = true;
}
} |
Kindly try the above solution and get back to us if you need any further assistance.
Regards,
Hareesh