By default, the JavaScript Scheduler component works with exact time points for both the event start and end. A one-day event looks like this:
-
start: "2027-01-01T00:00:00"
-
end: "2027-01-02T00:00:00"
The same logic is used for time range selecting.
You can switch the Scheduler to treat the end date as date-only value using the eventEndSpec property. With this value set to "Date"
, the end date will be interpreted as "the end of the specified day":
-
start: "2027-01-01T00:00:00"
-
end: "2027-01-01T00:00:00"
JavaScript
Example:
const scheduler = new DayPilot.Scheduler("scheduler", {
eventEndSpec: "Date",
// ...
});
scheduler.init();
const resources = [ { name: "Resource 1", id: "R1" } ];
const events = [ { text: "One-Day Event", id: "1", start: "2027-01-01", end: "2027-01-01", resource: "R1"} ];
scheduler.update({resources, events});
See also:
-
DayPilot.Scheduler.eventEndSpec property
ASP.NET WebForms
Example:
<DayPilot:DayPilotScheduler
...
EventEndSpec="Date"
/>