The showCurrentTime property (boolean) enables or disables the current time indicator in the JavaScript Calendar component.
Declaration
DayPilot.Calendar.showCurrentTimeDefault Value
falseNotes
The current time indicator displays a line at the current time position and updates automatically as the time changes.
The indicator is marked with the _now CSS class. If you need more control, you can highlight the current cell manually using DayPilot.Calendar.onBeforeCellRender.
Examples
JavaScript
const calendar = new DayPilot.Calendar("dp", {
showCurrentTime: true,
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
showCurrentTime: true,
// ...
};React
<DayPilotCalendar
showCurrentTime={true}
{/* ... */}
/>Vue
<DayPilotCalendar
:showCurrentTime="true"
<!-- ... -->
/>See Also
DayPilot.Calendar.showCurrentTimeMode
DayPilot.Calendar.showCurrentTimeOffset
Highlighting Current Time [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot