The startDate property (string | DayPilot.Date) sets the date displayed by the JavaScript Calendar component.
Declaration
DayPilot.Calendar.startDateDefault Value
DayPilot.Date.today();Notes
Depending on DayPilot.Calendar.viewType, this property sets the first visible date directly ("Day", "Days") or is used to calculate the visible period ("Week", "WorkWeek").
In the resource calendar view, this value is used as the default start date for columns that do not define their own start value.
String values are converted to DayPilot.Date automatically.
Examples
JavaScript
const calendar = new DayPilot.Calendar("calendar", {
startDate: "2025-03-01",
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
startDate: "2025-03-01",
// ...
};React
<DayPilotCalendar
startDate={"2025-03-01"}
{/* ... */}
/>Vue
<DayPilotCalendar
:startDate="'2025-03-01'"
<!-- ... -->
/>See Also
DayPilot.Calendar.visibleStart()
DayPilot.Calendar.visibleEnd()
Manual Date Switching [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot