The client-side AfterRender event is fired every time the Calendar rendering/updating is completed.
It has access to custom data passed to Update method on the server side.
JavaScript
This event only fires during the initial load.
<div id="dp"></div>
<script type="text/javascript">
var dp = new DayPilot.Month("dp");
dp.onAfterRender = function (args) {
console.log("Rendering finished.");
};
// ...
dp.init();
</script>See also:
ASP.NET WebForms
<daypilot:DayPilotMonth
id="DayPilotMonth1"
runat="server"
...
AfterRenderJavaScript="afterRender(data, isCallBack);"
/>
<script type="text/javascript">
function afterRender(data, isCallBack) {
if (isCallBack) {
console.log("Callback finished. Custom data received: " + data);
}
}
</script>ASP.NET MVC
@Html.DayPilotMonth("dpm", new DayPilotMonthConfig {
BackendUrl = ResolveUrl("~/Month/Backend"),
...
AfterRenderJavaScript = "afterRender(data, isCallBack)"
})
<script type="text/javascript">
function afterRender(data, isCallBack) {
if (isCallBack) {
console.log("Callback finished. Custom data received: " + data);
}
}
</script>Availability
Availability of this feature in DayPilot editions:
| Lite | Pro | |
|---|---|---|
| DayPilot for JavaScript | ||
| DayPilot for ASP.NET WebForms | ||
| DayPilot for ASP.NET MVC | ||
| DayPilot for Java |
DayPilot