
Tutorials
- HTML5 Event Calendar for Touch Devices - iPad, iPhone, Android (PHP, JavaScript)
Tutorial on customizing the behavior and UI actions on touch devices (DayPilot Pro for JavaScript) - Angular Calendar: Detect Orientation Change (Landscape/Portrait)
How to switch the Calendar views on device rotation.
Touch Gestures
Use touch gestures to select a time slot, extend a selection, or reschedule an event in the Calendar’s timed grid. DayPilot Lite for JavaScript supports these gestures starting with 2026.4.901.
- Tap an event to run its event click action. Tap an empty slot to select that slot.
- Press and hold an empty slot, then drag within the same column to select a longer time range.
- Press and hold an event, then drag to move it. A swipe before the hold activates scrolls the Calendar.
The default hold threshold is 300 ms. Change tapAndHoldTimeout to give users more or less time before a hold activates.
Context menus on a hold in DayPilot Pro
DayPilot Pro can assign the hold itself to a menu. Use eventTapAndHoldHandling for the event context menu and timeRangeTapAndHoldHandling for the time range context menu.
Touch Controls on Events
Add event active areas for controls users can reach directly. Set visibility to TouchVisible to show them on touch devices and on hover when using a pointer.
- Use
Moveto start moving an event as soon as the user drags its handle. - Use
ResizeStartorResizeEndto change the start or end time. - Use
ContextMenuto open an event context menu with a tap.
The Touch Calendar demo shows time selection, event moving, and resizing. The Touch Event Menus demo shows menu actions that depend on the selected booking’s status.
Add a Resize Handle
On a Calendar that displays events, this callback adds a handle at the bottom of each event and keeps any existing active areas. Use the same addResizeHandle callback in each framework.
function addResizeHandle(args) {
args.data.areas = [
...(args.data.areas || []),
{
right: 4, bottom: 3, width: 52, height: 24,
text: "Resize", toolTip: "Resize event end",
backColor: "#e8eef8", fontColor: "#173866",
action: "ResizeEnd", visibility: "TouchVisible"
}
];
}
In a TypeScript file, give the callback argument the type DayPilot.CalendarBeforeEventRenderArgs from your framework’s DayPilot package.
JavaScript
Use a Calendar host with the ID dp. Add the callback to your Calendar options alongside your event data.
const calendar = new DayPilot.Calendar("dp", {
tapAndHoldTimeout: 350,
onBeforeEventRender: addResizeHandle
});
calendar.init();
Angular
Define the typed configuration in the component class and bind it to the Calendar.
import { DayPilot } from "@daypilot/daypilot-lite-angular";
// Inside your component class
config: DayPilot.CalendarConfig = {
tapAndHoldTimeout: 350,
onBeforeEventRender: addResizeHandle
};
<daypilot-calendar [config]="config"></daypilot-calendar>
React
Assign the delay and callback as component props.
import { DayPilotCalendar } from "@daypilot/daypilot-lite-react";
<DayPilotCalendar
tapAndHoldTimeout={350}
onBeforeEventRender={addResizeHandle}
/>
Vue
Define the callback in your setup script, then bind it and the delay to the Calendar.
<script setup>
import { DayPilotCalendar } from "@daypilot/daypilot-lite-vue";
// Define addResizeHandle in this script.
</script>
<template>
<DayPilotCalendar
:tapAndHoldTimeout="350"
:onBeforeEventRender="addResizeHandle"
/>
</template>
Platforms and Devices
DayPilot Pro platform support (tablets and smartphones):
- iOS/iPadOS 12+ (iPhone, iPad)
- Android 10+
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