File

projects/components/widgets/input/calendar/src/calendar.component.doc.ts

Description

The wmCalendar component defines the Calendar widget.

Index

Methods
Inputs

Methods

gotoDate
gotoDate()

It shows the calendar view to specific date given for the calendar.

Returns : void
gotoMonth
gotoMonth()

It shows the calendar view to specific month given for the calendar.

Returns : void
gotoNextMonth
gotoNextMonth()

This method renders the present view for the next month.

Returns : void
gotoNextYear
gotoNextYear()

This method renders the present view for the next year.

Returns : void
gotoPrevMonth
gotoPrevMonth()

This method renders the present view for the previous month.

Returns : void
gotoPrevYear
gotoPrevYear()

This method renders the present view (i.e. month/week view will be the same) for the next year.

Returns : void
onEventclick
onEventclick($event: Event, $data: any, $view: any)

Callback function which will be triggered when resizing of the event in calendar stops and the event has changed in duration..

Parameters :
Name Type Optional Description
$event Event No

Is an Event Object that hold the event’s information (date, title, etc).

$data any No

Calendar event object.

$view any No

An object containing information about a calendar view.

Returns : void
onEventdrop
onEventdrop($event: Event, $newData: any, $oldData: any, $delta: any, $revertFunc: Function, $ui: any, $view: any)

Callback function which will be triggered when dragging of an event in calendar stops and the event has moved to a different day/time..

Parameters :
Name Type Optional Description
$event Event No

Is an Event Object that hold the event’s information (date, title, etc). Call hasTime on the event’s start/end to see if it has been dropped in a timed or all-day area (more info).

$newData any No

Calendar event object after its position change.

$oldData any No

Calendar event object before its position change.

$delta any No

Is a Duration Object that represents the amount of time the event was moved by. Available in version 2.0.1 and later.

$revertFunc Function No

Is a function that, if called, reverts the event’s start/end date to the values before the drag.

$ui any No

Holds an empty object.

$view any No

An object containing information about a calendar view.

Returns : void
onEventrender
onEventrender($event: Event, $data: any, $view: any)

Callback function which will be triggered when an event is rendered.

Parameters :
Name Type Optional Description
$event Event No

Is an Event Object that hold the event’s information (date, title, etc).

$data any No

Calendar event object.

$view any No

An object containing information about a calendar view.

Returns : void
onEventresize
onEventresize($event: Event, $newData: any, $oldData: any, $delta: any, $revertFunc: Function, $ui: any, $view: any)

Callback function which will be triggered when resizing of the event in calendar stops and the event has changed in duration..

Parameters :
Name Type Optional Description
$event Event No

Is an Event Object that hold the event’s information (date, title, etc). Call hasTime on the event’s start/end to see if it has been dropped in a timed or all-day area (more info).

$newData any No

Calendar event object after its position change.

$oldData any No

Calendar event object before its position change.

$delta any No

Is a Duration Object that represents the amount of time the event was moved by. Available in version 2.0.1 and later.

$revertFunc Function No

Is a function that, if called, reverts the event’s start/end date to the values before the drag.

$ui any No

Holds an empty object.

$view any No

An object containing information about a calendar view.

Returns : void
onSelect
onSelect($start: number, $end: number, $view: any, $data: Array)

Callback function which will be triggered when dates are selected in the calendar.

Parameters :
Name Type Optional Description
$start number No

Is a Timestamp indicating the beginning of the selection.

$end number No

Is a Timestamp indicating the end of the selection.

$view any No

An object containing information about a calendar view.

$data Array<any> No

List of all the events that fall within selected dates.

Returns : void
onViewrender
onViewrender($view: any)

Callback function which will be triggered when the calender view is changed or when the calendar is rendered.

Parameters :
Name Type Optional Description
$view any No

An object containing information about a calendar view.

Returns : void
rerenderEvents
rerenderEvents()

This method rerenders the events from the data set.

Returns : void
selectDate
selectDate()

It highlights the default date given for the calendar.

Returns : void

Inputs

class
Type : string

Class of the widget.

controls
Type : string
Default value : 'navigation,today,month,week,day'

This property allows to enable the controls for the widget.

Allowed Values: navigation, today, month, week, day

navigation: Navigate between the months, weeks and days, depending on the calendar view.

today: Select current day.

month: Switch the view to Month.

week: Switch the view to week.

day: Switch the view to day.

dataset
Type : Array<any>

Set this property to a data source to show events on the calendar.

Bindable: true

deferload
Type : boolean
Default value : false

this property when enabled, the initialization of the widget will be deferred till the widget becomes visible.

eventallday
Type : string

Whether it is an All day event or not, set from the Dataset fields.

eventclass
Type : string

Class to be applied to that event, set from the Dataset fields.

eventend
Type : string

End date or date time for the event, set from the Dataset fields.

eventstart
Type : string

Start date or date time for the event, set from the Dataset fields.

eventtitle
Type : string

Title for the Event, set from the Dataset fields.

Bindable: true

name
Type : string

Name of the Calendar.

selectionmode
Type : string
Default value : 'none'

This property allows to configure dates selection in the calendar.

Allowed Values: none, single, multiple

none: No selection, the calendar is just there to present data, not to be selected.

single: Only one row can be selected at a time.

multiple: Many rows can be selected at a time.

show
Type : boolean
Default value : true

This property will be used to show/hide the Calendar widget on the web page.

Bindable: true

tabindex
Type : number
Default value : 0

This property specifies the tab order of the Calendar Widget.

type
Type : string
Default value : 'basic'

This property allows to select different calendar types.

Allowed Values: basic, agenda, list

basic: Will show the events in a single row.

agenda: Will show the complete day agenda with hours included.

list: Will show the events in a list format.

view
Type : string
Default value : 'month'

This property allows to change the view of the calendar.

Allowed Values: month, week, day

month: Displays all the days in the month.

week: Displays all the days in the week.

day: Displays a single day.

results matching ""

    No results matching ""