Calendar View
The calendar view shows data with schedule/agenda like interface with drag and drop support.
<calendar name="project-task-calendar-my"
title="My Tasks"
model="com.axelor.project.db.ProjectTask"
colorBy="project"
eventStart="startDate"
eventStop="endDate"
eventLength="1">
<hilite if="state === 'todo'" styles="outline" />
<hilite if="state === 'progress'" styles="stripe" />
<hilite if="state === 'complete'" styles="strike" />
<hilite if="$moment().isAfter(endDate ?? startDate)" styles="fade" />
<field name="name" />
<field name="createDate" />
<field name="user" />
<field name="state" />
<template>
<![CDATA[
<>
<ul>
<li>{$fmt("createDate")}</li>
<li>{$fmt("user")}</li>
</ul>
</>
]]>
</template>
</calendar>
The calendar view attributes are:
Attribute | Description |
---|---|
|
name of the calendar view |
|
fully qualified name of the domain model |
|
name of the field of type date/datetime to be used as event start time |
|
name of the field of type date/datetime to be used as event stop time |
|
if eventStop is not given, the length of an event in hour (default is 1) |
|
working hours per day (default is 8) |
|
name of the field to be used to colorize the events (colors are used consistently according to the field and there is a maximum of 30 different colors) |
|
default view mode (month, week or day) |
|
an action to call when event is changed (with drag or resize) |
The calendar data shows records as events.