Skip to main content

Read-only Mode

In this part we want to consider read-only mode in the context of 4 situations:

  1. Read-only mode for the entire scheduler;
  2. Read-only mode for the entire lightbox;
  3. Read-only mode for a lightbox's section;
  4. Read-only mode for specific events.

Read-only mode for the entire scheduler

To make the entire scheduler read-only, set the readonly option to true.

scheduler.config.readonly = true;
...
scheduler.init('scheduler_here', new Date(2027, 5, 11), "month");

Note, when the entire scheduler is non-editable, users can't open the lightbox.

Read-only mode for the entire 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(2027, 5, 11), "month");
note

The readonly option is provided in the readonly extension, and to use it, enable the extension on the page.

Read-only mode for a lightbox's section

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", () => {
const descriptionSection = scheduler.formSection("description");
descriptionSection.control.disabled = true;
});
note

Note, you refer to the section through its type, and all sections that have this type will be read-only at once.

Read-only mode for specific events

To make specific events read-only, add the readonly property to them and set it to true:

scheduler.getEvent(id).readonly = true;
note

The functionality is provided in the readonly extension, and to use it, enable the extension on the page.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.