In this part we want to consider read-only mode in the context of 4 situations:
To make the entire scheduler read-only, set the readonly option to true.
scheduler.config.readonly = true;
...
scheduler.init('scheduler_here',new Date(2019, 5,11),"month");
Note, when the entire scheduler is non-editable, users can't open the lightbox.
To leave for users the possibility to open the lightbox, but to forbid any editing inside it, set the readonly_form option to true:
scheduler.config.readonly_form = true;
...
scheduler.init('scheduler_here',new Date(2019, 5,11),"month");
The readonly option is provided in the readonly extension and to use it, enable the extension on the page.
Related sample: Read-only lightbox
To make a specific lightbox's section read-only, use the 'disabled' property of a DOM element of the related section object:
scheduler.config.lightbox.sections=[
{name:"description", height:200, map_to:"text", type:"textarea" , focus:true},
{name:"time", height:72, type:"time", map_to:"auto"}
];
scheduler.attachEvent("onLightbox", function(){
var section = scheduler.formSection("description");
section.control.disabled = true;
});
Note, you refer to the section through its type and all sections that have this type will be read-only at once
To make specific events read-only, add the property 'read-only' to them and set it to true:
scheduler.getEvent(id).readonly = true;
The functionality is provided in the readonly extension and to use it, enable the extension on the page.
Related sample: Read-only events
Back to top