File

projects/components/src/widgets/common/calendar/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

Class of the widget.

Type : string

controls

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.

Type : string

Default value : 'navigation,today,month,week,day'

dataset

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

Bindable: true

Type : Array<any>

deferload

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

Type : boolean

Default value : false

eventallday

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

Type : string

eventclass

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

Type : string

eventend

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

Type : string

eventstart

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

Type : string

eventtitle

Title for the Event, set from the Dataset fields.

Bindable: true

Type : string

name

Name of the Calendar.

Type : string

selectionmode

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.

Type : string

Default value : 'none'

show

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

Bindable: true

Type : boolean

Default value : true

tabindex

This property specifies the tab order of the Calendar Widget.

Type : number

Default value : 0

type

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.

Type : string

Default value : 'basic'

view

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.

Type : string

Default value : 'month'

result-matching ""

    No results matching ""