The width property (number | string) sets the width of the JavaScript Month calendar.

Declaration

DayPilot.Month.width

Default Value

null

Notes

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 month = new DayPilot.Month("dp", {width: 800});
month.init();

// Fill the container when switching to the flexible layout.
month.update({width: "100%"});

Angular

<daypilot-month [config]="config"></daypilot-month>
config: DayPilot.MonthConfig = {
  width: 800
};

React

<DayPilotMonth width={800} />

Vue

<DayPilotMonth :width="800" />

See Also

DayPilot.Month Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript