controloptions
expression in the layout of a form page."defaultView: 'agendaDay'"
will show the calendar in an agenda day view by default."slotMinutes: 10, firstHour: 8"
is passed to the constructor of the control.
layout {
row {
ControlStdCalendar("slotMinutes: 10, firstHour: 8")
MYSWC@200.300:mycalendar {
...
}
}
}
This sample layout sets the scroll position to the current hour. If the current time is later than 6pm then 8am is used instead.
Since this option is dynamic it is calculated in a controloptions
expression.
layout {
row {
ControlStdCalendar MYSWC@200.300:mycalendar {
rowspan = 2;
colspan = 4;
labelposition = top;
controloptions = expression {
integer @firsthour = coonow.hour > 18 ? 8 : coonow.hour;
string @options = "slotMinutes: 10, firstHour: " + @firsthour;
return @options;
}
}
}
}
The control arguments and control options are automatically passed to the instance of the calendar control at the client side,
so no further code in JavaScript is necessary. The control arguments and the control options can specify any documented option
to the fullCalendar
JavaScript object.
$('#calendar').fullCalendar({
// your control arguments and control options are passed here automatically
})
In addition, this control supports the control option enlargePosterWidget
. If this option is set to true
,
the control will get additional space in the dashboard when it is shown in a poster widget. Only the first widget in the dashboard
can be a poster widget. Moreover, the property formpageisposterwidget
must be set to true
.
private form ExploreFormVCalendar {
private formpage ExplorePageCalendar {
formpageisposterwidget = true;
symbol = SymbolCalendar;
dataset {
calendar;
}
layout {
// Auto-generated layout block
row {
ControlStdCalendar calendar {
colspan = 4;
labelvisible = false;
controloptions = expression {
return { enlargePosterWidget: true };
}
}
}
}
}
...
}
FSCCALDAV@1.1001:ControlStdCalendar()
Additional Information