MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / getTimeSection

Function getTimeSection

codebase/sources/dhtmlxscheduler.js:19757–19769  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19755 }, focus: function(node) {
19756 } };
19757 function getTimeSection() {
19758 let timeControl = scheduler2.formSection("time");
19759 if (!timeControl) {
19760 timeControl = getFirstSectionOfType("time");
19761 }
19762 if (!timeControl) {
19763 timeControl = getFirstSectionOfType("calendar_time");
19764 }
19765 if (!timeControl) {
19766 throw new Error(["Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.", "You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ", 'In the latter case, make sure the control is named "time":', "", "scheduler.config.lightbox.sections = [", '{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];'].join("\n"));
19767 }
19768 return timeControl;
19769 }
19770 function getFirstSectionOfType(type) {
19771 for (let i = 0; i < scheduler2.config.lightbox.sections.length; i++) {
19772 let section = scheduler2.config.lightbox.sections[i];

Callers 2

recurringFunction · 0.70
recurring_legacyFunction · 0.70

Calls 2

getFirstSectionOfTypeFunction · 0.70
formSectionMethod · 0.65

Tested by

no test coverage detected