By default, the JavaScript Month calendar fills the available width of a block-level host. Set width to size it explicitly, or size the containing element with CSS to let it follow the layout.
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 value during initialization or change it with update after the component is displayed.
Set the Month calendar width
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" />ASP.NET WebForms Example
<DayPilot:DayPilotMonth runat="server" id="DayPilotMonth1"
Width="100%" ...
/>
ASP.NET MVC Example
@Html.DayPilotMonth("dps", new DayPilotMonthConfig {
BackendUrl = ResolveUrl("~/Month/Backend"),
Width = "100%",
...
})
Java Example (JSP)
<div id="dpm"></div>
<script type="text/javascript">
var dpm = new DayPilot.Month("dpm");
dpm.backendUrl = "${pageContext.request.contextPath}/dpm";
dpm.width = "100%";
// ...
dpm.init();
</script>
Availability
Availability of this feature in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript | ||
| DayPilot for ASP.NET WebForms | ||
| DayPilot for ASP.NET MVC | ||
| DayPilot for Java |
DayPilot