DayPilot.Scheduler.eventEndSpec

The eventEndSpec property (string) determines how the Scheduler interprets the event end value, either as an exact point in time or as a date-only value.

Declaration

DayPilot.Scheduler.eventEndSpec

Possible Values

  • "DateTime" - interprets the end value as an exact date/time point.

  • "Date" - interprets the end value as a date-only value.

Default Value

"DateTime"

Notes

With "DateTime", the end value is used as an exact date/time point.

With "Date", a date-only end such as "2035-01-01" is interpreted as "2035-01-02T00:00:00".

Examples

JavaScript

Default behavior:

const dp = new DayPilot.Scheduler("dp", {
  eventEndSpec: "DateTime",
  events: [
    {
      id: 1,
      start: "2035-01-01", // equals "2035-01-01T00:00:00"
      end: "2035-01-02",   // equals "2035-01-02T00:00:00"
      resource: "A"
    }
  ],
  // ...
});
dp.init();

End specified as date only:

const dp = new DayPilot.Scheduler("dp", {
  eventEndSpec: "Date",
  events: [
    {
      id: 1,
      start: "2035-01-01", // equals "2035-01-01T00:00:00"
      end: "2035-01-01",   // interpreted as "2035-01-02T00:00:00"
      resource: "A"
    }
  ],
  // ...
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  eventEndSpec: "Date",
  // ...
};

React

<DayPilotScheduler
  eventEndSpec="Date"
  {/* ... */}
/>

Vue

<DayPilotScheduler
  eventEndSpec="Date"
  <!-- ... -->
/>

See Also

Event End Date/Time [doc.daypilot.org]

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript