Questions Tagged javascript

How to detect click on disabled cell

Answered: Please take a look at the following tutorial, which uses onTimeRangeSelecting , onEventMoving and onEventResizing to disable custom time segments (that do not correspond to whole cells): JavaScript S...

Cell Height for the event no correct

Answered: It the open-source version, the event box is always aligned with the grid cells. In the Pro version, it is possible to turn off this behavior (see exact event duration ). The real start and end is hi...

Time Range Click with multi range not working

Answered: These events are fired for the current selection (the one you click), but you can always get all selected time ranges using the multiselect.get() method. Please let me know if this is not what you ar...

Consistent .makeDraggable() functionality

Answered: In the latest release ( 2024.4.6293 ), the makeDraggable() methods for Calendar and Scheduler components now use the same structure of the options parameter. remove , onDragStart and onDrop are avail...

beforeCellRenderCaching in 'normal' calendar

Answered: Hello Dan, while I was preparing some code for this issue, I found the mistake myself… my backend data was fetched via rest call correctly, but the data was not assigned to the object, which I use in...

Debug code for scheduler

Answered: Meanwhile, some general debugging info: > While all functionality works correctly in the HTML window (excluding double-click, right-click, and hover interactions on both row headers and events), sing...

Scheduler watch update events

Answered: In order to detect changes performed by the Scheduler UI in Vue, you need to watch the source object. Like this: <template> <DayPilotScheduler :events="events" :resources="resources" /> </template> <...

Event Calendar Delete Confirmation?

Answered: When you use an async function in the event handler, calling args.preventDefault() after await has no effect as the processing continues immediately (before args.preventDefault() gets called). You ne...

Plans on using Canvas?

Answered: Canvas is very fast, but it doesn’t support HTML for styling which is a huge disadvantage. We built a prototype some time ago. Everyone wants it fast but when it comes to styling, nobody wants to giv...

YearView Scheduler

Answered: Thanks, Mikolaj! There are two options: You can force a specific line in a row using the line property of an event. You can join the events virtually into a single unit using the container property -...

Check For Overlap with Javascript

Answered: You can do it in the onEventMove event handler using the events.forRange() method: onEventMove: args => { const movedEvent = args.e; const newStart = args.newStart; const newEnd = args.newEnd; const ...

Cancel menu deactivation

Answered: To prevent the menu from closing when an item is clicked, you can add an onClick event handler to the items and stop the click event from bubbling: const menu = new DayPilot.Menu({ items: [ { text: "...

Custom timeline not cut off correctly

Answered: In the manual timeline mode, the Scheduler always uses the default cell width unless you specify it explicitly. The start and end of the last shift are correct (2 hours), but it is displayed at full ...

Avoid focusing an event on keyboard.focusCell

Answered: The current implementation of keyboard.focusCell() finds the default keyboard cursor position for the specified cell. That can be an event if it is at the top position (line 0). However, it should be...

List view for calendar

Answered: You can use the Queue component to display a list of events. As a bonus, they will be draggable to the Scheduler. You can see a demo here.

Selecting Multiple Rows Header On Row Click

Answered: You can add the row to selection in onRowClicked using the rows.selection.add() method. It is also possible to implement a “toggle” logic using rows.selection.isSelected() and rows.selection.remove()...