The viewType property (string) sets the view type of the JavaScript Calendar component.
Declaration
DayPilot.Calendar.viewTypePossible Values
"Day"- displays a single day specified by DayPilot.Calendar.startDate."Days"- displays a custom number of consecutive days starting at DayPilot.Calendar.startDate."Resources"- displays the resource-scheduling calendar view with custom columns or resources."Week"- displays 7 days, with the first day calculated from DayPilot.Calendar.startDate using the current locale."WorkWeek"- displays Monday through Friday, with the starting Monday calculated from DayPilot.Calendar.startDate.
Default Value
"Days"Notes
The "Days" view uses DayPilot.Calendar.days to determine how many consecutive days are visible.
Examples
JavaScript
const calendar = new DayPilot.Calendar("dp", {
viewType: "Week",
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
viewType: "Week",
// ...
};React
<DayPilotCalendar
viewType="Week"
{/* ... */}
/>Vue
<DayPilotCalendar
:viewType="'Week'"
<!-- ... -->
/>See Also
DayPilot.Calendar.visibleStart()
DayPilot.Calendar.visibleEnd()
Resource-Scheduling Calendar [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot