You can disable time range selecting using the config:
{
timeRangeSelectedHandling: "Disabled",
// ...
}
If you want to use this feature to create new events, it is necessary to call clearSelection() after you process the event.
Here is an example:
{
timeRangeSelectedHandling: "Enabled",
onTimeRangeSelected: async (args) => {
const modal = await DayPilot.Modal.prompt("Create a new event:", "Event 1");
const dp = args.control;
dp.clearSelection();
if (modal.canceled) { return; }
dp.events.add({
start: args.start,
end: args.end,
id: DayPilot.guid(),
text: modal.result
});
},
}