The width property (number | string) sets the width of the JavaScript Calendar.
Declaration
DayPilot.Calendar.widthDefault Value
nullNotes
By default, the component uses its host element’s width. A block-level host normally fills the available space.
Use a number such as 800 for pixels or a CSS string such as "800px" or "80%". Numeric widths are supported in Pro since 2026.4.7172 and in Lite since 2026.4.902.
Set the width before initialization or pass it to update() to resize an initialized component.
Examples
JavaScript
const calendar = new DayPilot.Calendar("dp", {width: 800});
calendar.init();
// Fill the container when switching to the flexible layout.
calendar.update({width: "100%"});Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
width: 800
};React
<DayPilotCalendar width={800} />Vue
<DayPilotCalendar :width="800" />See Also
Responsive Column Width [doc.daypilot.org]
Width [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot