CalendarList
CalendarList widget shows the records as events of a calendar: a month, a week or a day.
Basics
How does it look?

A record is shown as an event by three fields of the widget:
- a title field — the value shown in the event;
- a start field and an end field —
dateTimefields with the period of the event.
options.calendar
The fields of the event are set in options.calendar of .widget.json.
Example
| Property | Type | Default | Description |
|---|---|---|---|
valueFieldKey |
String | value |
Name of the field shown as the title of the event. |
startFieldKey |
String | start |
Name of the dateTime field with the start of the event. |
endFieldKey |
String | end |
Name of the dateTime field with the end of the event. |
Info
The title field can have a drilldown: a click on the title of the event opens the link, a click on the rest of the event opens the edit form. see Edit
How to add?
Example
Step1 Create file .widget.json with type = "CalendarList". Add the fields of the event and options.calendar.
Step2 Add widget to corresponding **.view.json **.
Title
Info
Title is not available in this release: the widget does not show a title.
Color
Color allows you to specify a color for the events. It is set for the title field of the event (valueFieldKey) and can be constant or calculated.
Calculated color
Calculated color can be used to change the color of an event dynamically. It changes depending on business logic or data in the application.
Constant color
Constant color is a fixed color that doesn't change. It remains the same regardless of any factors in the application.
How does it look?

How to add?
Example
Step 1 Add custom field for color to corresponding DataResponseDTO. The field can contain a HEX color or be null.
Step 2 Add "bgColorKey" : custom field for color to the title field of the event in .widget.json.
Business component
This specifies the business component (BC) to which this widget belongs. A business component represents a specific part of a system that handles a particular business logic or data.
see more Business component
Show condition
no show condition - recommended: widget always visible
show condition by current entity: not recommended for the calendar.
show condition by parent entity: condition can include boolean expression depending on parent entity. Parent field updates will trigger condition recalculation only on save or if field is force active shown on same view
Tips
It is recommended not to use Show condition when possible, because wide usage of this feature makes application hard to support.
How does it look?

Not recommended for the calendar.

How to add?
Example
see Basic
Not recommended for the calendar.
Step1 Add showCondition to .widget.json. see more showCondition
Live Sample · GitHubFields
Fields Configuration. The fields array defines the fields of the event (see options.calendar) and the fields available for filtration.
- "title"
Description: Field Title.
Type: String(optional).
-
"key"
Description: Name field to corresponding DataResponseDTO.
Type: String(required).
-
"type"
Description: Field types
Type: String(required).
How to add?
Options layout
options.layout - no use in this type.
Actions
Actions show available actions as separate buttons see more Actions.
Create
Create button enables you to create a new record. There are the methods to create a record:
-
Inline: not available in this release.
-
Inline-form: You can add data using a form widget in a popup over the calendar. This is the default when
options.create.widgetis set. -
With view: You can create a record by navigating to a view.
Inline-form
Create with widget opens the form widget of options.create in a popup over the calendar when the "Create" button is clicked. After filling the information in and clicking "Save", the popup is closed and the new event is shown in the calendar.
options.create.style:
inlineForm(default) orpopup: the form is shown in a popup;none: no form.
The width of the popup is the gridWidth of the form widget in .view.json, like for the other popup widgets.
How does it look?

How to add?
Example
Step1 Add button create to corresponding VersionAwareResponseService.
Step3 Create widget.json with type Form that appears when you click a button
Step4 Add widget.json with type Form to corresponding .view.json. gridWidth is the width of the popup.
Step5 Add button create and widget with type Form to corresponding .widget.json.
options.create: Name widget that appears when you click a button
With view
With Create with view, clicking the "Create" button opens a separate view that displays only the data entry form. After completing the form and saving, the system returns to the calendar with the new event.
How does it look?

How to add?
Example
Step1 Add button create to corresponding VersionAwareResponseService.
create to corresponding .widget.json.
Edit
Edit enables you to change the field value. There are the methods to edit a record:
-
Inline edit: not available in this release.
-
Inline-form: A click on the event opens the form widget in a popover next to the event.
-
With view: You can edit a record by navigating to a view.
Inline-form
Edit with widget opens the form widget of options.edit in a popover when clicking on the event. The actions of the record are in the three-dot menu of the form.
options.edit.style:
inlineForm(default): the form is shown in a popover at the event;popup: the form is shown in a popup over the calendar, like the form ofoptions.create;none: no form.
The width of the popover or the popup is the gridWidth of the form widget in .view.json.
How does it look?

How to add?
Example
Step1 Add button save to corresponding VersionAwareResponseService.
Step2 Add fields.setEnabled to corresponding FieldMetaBuilder.
Step3 Create widget.json with type Form that appears when you click an event
Step4 Add widget.json with type Form to corresponding .view.json. gridWidth is the width of the popover.
Step5 Add widget with type Form to corresponding .widget.json.
options.edit: Name widget that appears when you click an event
With view
With Edit with view, you can edit the entity from a separate view that displays only the data entry form. Click on the "Edit" option in the three-dot menu of the event.
How does it look?

How to add?
Example
Step1 Add action edit to corresponding VersionAwareResponseService.
Add PostAction.drillDown to method edit
Step2 Add button or group button to corresponding .widget.json. Live Sample · GitHubAdditional properties
Customization of displayed columns
not applicable: the calendar has no columns.
Filtration
The fields of the widget with a filter are shown above the calendar; the start and the end fields of the event are not shown there, the shown period filters the records by them.

see more Fields
Pagination
The periods of the calendar are its pages: the arrows go to the next and the previous month, week or day, "Today" returns to the current period. The records of the shown period are requested with the filter by the start and the end fields.

Month / Week / Day
The buttons "Month", "Week", "Day" of the toolbar show the events of a month, a week or a day:
Month(default): the events of the month by days; a day shows up to 5 events, the others are behind "+N more";Week,Day: the events are placed by hours.
