Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
...
id: Menu element unique id. Userview will use this id in the URL for the menu if the Custom ID is empty.
Figure 1: Calendar Menu Properties
Figure 2: Sample Calendar Menu in runtime
...
Custom ID: Item link slug. Optional field.
Info |
---|
Ensure that value defined here is unique to other userview menus in the app, since the first matching/conflicting ID will take precedence in page loading. |
Label
...
: The userview menu label.
Page Title
...
: Calendar page title.
Data Binder
...
: See list of available Datalist Binders, to source the data for calendar entries.
Auto Handle Date Range
...
: Enable this option to automatically handle range of calendar events to be populated into the calendar, based on event dates and calendar view format.
If this option is disabled, you need to manually handle date range via #requestParam.start# and #requestParam.end# request parameter hash variables in your datalist binder configuration.
Date format for date range is yyyy-MM-dd.
Figure 1: Calendar Menu Properties
Figure 2: Sample Calendar Menu in runtime
...
Event ID (column ID)
...
: Defines individual calendar entry IDs, based on each distinct datalist record.
...
...
Event Title (column ID)
...
: Calendar entry title.
All Day (column ID, boolean value)
...
: Expects a true or false value, to determine if the calendar entry is an all day event.
From Date (column ID)
...
: Calendar entry start date value.
Info |
---|
You can also point to Date Picker form field with time support. |
From Time (column ID)
...
: Calendar entry start time value.
Info |
---|
If the From Date value already contains a time value, leave this field empty. |
To Date (column ID)
...
: Calendar entry end date value.
Info |
---|
You can also point to Date Picker form field with time support. |
To Time (column ID)
...
: Calendar entry end time value.
Info |
---|
If the To Date value already contains a time value, leave this field empty. |
Date Format
...
: You must specify the actual date format used by the From/To Date values.
...
Date Format in Java is expected here, e.g.: yyyy-MM-dd.
Info |
---|
If the date values has a time value, just define the date format only and not the time format. Because the time format is already handled by the Time Format property. |
Time Format
...
: Available options:
Event Url (column ID)
...
: Calendar entry URL.
Color (column ID)
...
: Calendar entry CSS color code to style the calendar event.
CSS Class (column ID)
...
: Calendar entry CSS class to style the calendar event.
Additional Data
...
: Any additional data to be added to the calendar entry.
Figure 3: Column to Data Mappings Properties
Advanced
...
...
Additional Data:
Configurations to load calendar entries from Google Calendar.
Notes if you want the Calendar Menu plugin to connect to Google Calendar:
...
Figure 4: Google Calendar Integration Properties
Event Rendering Callback (Javascript): Custom Javascript code to execute upon rendering each calendar event.
Event After Rendering Callback (Javascript): Custom Javascript code to execute for each calendar event, after it has been rendered.
Code Block | ||||
---|---|---|---|---|
| ||||
var fromTime = event.start.format("H:mm").toString();
var toTime = event.end.format("H:mm").toString();
if (fromTime.indexOf("10:00") > -1 && toTime.indexOf("16:20") > -1) {
$(element).find('span.fc-time').text("First Shift --> ");
} |
See sample app here for more info: APP_calendarTest-sample.jwa
Event After All Rendering Callback (Javascript): Custom JavaScript code to execute after all rendering of the calendar menu has been completed.
In the sample below, upon clicking on a calendar date, it will redirect to an event form and prepopulate a date field with the clicked date.
Code Block | ||
---|---|---|
| ||
$("div.calendar_menu_body td.fc-day").click(function() {
var preferredDefaultTime = "09:00";
var dateFromFieldId = "date_from";
window.location = "calendarViewEditable?" + dateFromFieldId + "="
+ $(this).attr("data-date") + "%20" + preferredDefaultTime;
}); |
Event Click Callback (Javascript): Custom Javascript code to execute when a calendar event is clicked on.
Code Block | ||
---|---|---|
| ||
var popupActionDialog = new PopupDialog("EventFormMenuId?id="+event.id+"&embed=true");
popupActionDialog.init(); |
Code Block | ||
---|---|---|
| ||
var address = "EventFormMenuId?embed=true&id=" + event.id;
JPopup.show("testPopup", address, {}, "View Item", "50%", "50%"); |
Time Display Format: Refer to https://fullcalendar.io/docs/date-formatting-string for formats.
Code Block | ||
---|---|---|
| ||
h(:mm)t //2:12p, 1p
HH:mm //14:12, 13:00
hh(:mm)t //02:12p, 01p |
Custom Header (HTML): Custom header in HTML to show on the top of the calendar.
Custom Footer (HTML): Custom footer in HTML to show on the bottom of the calendar.
Figure 5: Events & UI Properties
Name | Description | Screens (Click to view) | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Event Rendering Callback (Javascript) | Custom Javascript code to execute upon rendering each calendar event. | Figure 5: Events & UI Properties | |||||||||||
Event After Rendering Callback (Javascript) | Custom Javascript code to execute for each calendar event, after it has been rendered.
See sample app here for more info: APP_calendarTest-sample.jwa | ||||||||||||
Event After All Rendering Callback (Javascript) | Custom JavaScript code to execute after all rendering of the calendar menu has been completed. In the sample below, upon clicking on a calendar date, it will redirect to an event form and prepopulate a date field with the clicked date.
| ||||||||||||
Event Click Callback (Javascript) | Custom Javascript code to execute when a calendar event is clicked on.
| ||||||||||||
Time Display Format | Refer to https://fullcalendar.io/docs/date-formatting-string for formats.
| ||||||||||||
Custom Header (HTML) | Custom header in HTML to show on the top of the calendar. | ||||||||||||
Custom Footer (HTML) | Custom footer in HTML to show on the bottom of the calendar. |
...