CodeCoupler UI Widget "Calendar"
The CodeCoupler Grid is basically a modified version of the main FullCalendar which can handle Kendo UI DataSources or its derivative CodeCoupler DataSource Mixins.
New Options
dataSource-
Define with
dataSourcea DataSource providing event objects. The DataSource will be queried for the current period to be displayed as soon as the calendar will be initialized and on each view change. IfdataSourceis set the origin optioneventsof FullCalendar will be removed. dataSourceFilter-
Define with
dataSourceFilterthe field names which will be used to query a time span and the base filter which will be always and-combined with the date range filtering.dataSourceFiltermust be an object and can have the following properties:Please note that the data in the field defined in
endhave to be an inclusive end date.Alternatively, the variable can be defined as a function. The function will receive two arguments:
startandend. These arguments contains the date in ISO formatYYYY-MM-DD. The start date is inclusive the end date is exclusive. You have to return a filter object which will be used. Example:Define dataSourceMap if using a function
If you define
dataSourceFilteras a function you must define adataSourceMapfunction. dataSourceMap-
With
dataSourceMapyou can convert a each data item to an event item. By default only the propertiesid,title,startandendwill be extracted from the data item. The default extraction try to get the id and the title from the fieldsidandtitle. The start and the end value will be extracted from the fields defined indataSourceFilterif not defined as function.You can overwrite this and add of course any other property like
display,allDayetc. Here an example:Please note that the resulting value of
endhave to be an inclusive end date.In addition to the basic event object properties you can set a new property
createtofalseif you do not want an data item to be mapped to an event. eventSources[].dataSource,eventSources[].dataSourceFilter,eventSources[].dataSourceMap-
Exactly like
dataSource,dataSourceFilteranddataSourceMapfor multiple event sources.eventSources.eventswill also be overwritten ifeventSources.dataSourceis set. dataSourceGlobalFilter-
Add a filter that will be always combined with the date range filtering of all dataSources (the main one and all dataSources from "eventSources"). It will be combined with "and".
onlyBackgroundEvents-
If
trueall events except backgroud events will be not shown. This allows a much smaller representation of the calendar. themeToolbar-
Different header themes. For now only one theme is implemented named
smallwhich is much smaller as the default one. Ifnullthe default one from FullCalendar will be displayed. pointerOnDay-
If true, the cursor will change to "pointer" on the whole day cell, not only on an event or the day number.
Changed defaults
Setter
dataSourceGlobalFilter-
Change
dataSourceGlobalFilterin runtime.
Howto get data item from event
If you get an event object you can access the corresponding datasource item: