Telerik RadCalendar exposes rich client-side API set which
allows for easy and flexible use in a wide range of
application scenarios.
In this example we demonstrate the main client-side
functions:
-
SelectDate(date, navigate) - Takes a triplet representation of
a date, and if valid selects it in the calendar. The second boolean
parameter denotes whether the calendar should navigate visually to
the selected date. You have to use the true value as an input, if false is used
the date will be selected but the calendar won�t change its visual state.
-
SelectDates(dates, navigate) - Takes an array of triplets
representing dates and if valid selects them in the calendar. The second
boolean parameter denotes whether the calendar should navigate
visually to the selected date. One must use true value as an input, if false is
used the date will be selected but the calendar won�t change its visual state.
-
UnselectDate(date) - Takes a triplet representation of a date
and if valid deselects it in the calendar.
-
UnselectDates(dates) - Takes an array of triplets representing
dates and if valid deselects them in the calendar.
-
GetSelectedDates( ) - Returns an array of date triplets,
representing the selected dates contained in the calendar.
-
GetRangeMinDate( ) - Returns an array of date triplets,
representing the RangeMinDate of the calendar.
-
SetRangeMinDate(date) - Takes an array of triplets representing
the date and if valid set the RangeMinDate to it.
-
GetRangeMaxDate( ) - Returns an array of date triplets,
representing the RangeMaxDate of the calendar.
-
SetRangeMaxDate(date) - Takes an array of triplets representing the
date and if valid set the RangeMaxDate to it.
All client-side functions that take or return date values use a custom
interchange format for transferring dates. The format (due to javascript�s
Date object regarding calendars different than Gregorian) is as follows: [2005,
11, 15]. This is a triplet array where the first position is the year, the
second is the month and the third is the day.
The selected dates array returned by some functions is an array, where every
cell of is a date representation triplet. This representation looks like this,
[ [2005, 11, 15], [2005, 11, 16], [2005, 11, 17] ]