Source Code & Description
RadDatePicker exposes a rich client-side API that allows you to control its
behavior.
You can manipulate the Min/MaxDate properties by the following client-side functions:
GetMinDate( ) - Returns the date,
representing the MinDate of the datepicker.
SetMinDate(date) - if the date is valid, the datepicker MinDate is set to it.
GetMaxDate( ) - Returns the date,
representing the MaxDate of the datepicker.
SetMaxDate(date) - if the date is valid, the datepicker MaxDate is set to it.
You can manipulate the date selection by using the GetDate()/SetDate(newValue)
method pair:
var date = datePicker.GetDate();
date.setDate(date.getDate() + 1);
datePicker.SetDate(date);
The datepicker child controls (RadDateInput, RadCalendar, DatePopupButton) are
available via the DateInput, Calendar, and DatePopupButton properties.
Customizing the popup logic is done by passing a pair of coordinates to the
ShowPopup method that determines where the calendar will be displayed.
RadDatePicker exposes two utility methods that help in determining an element's
location and dimensions. You can use those to position the popup
next to another HTML DOM object. The example obtains a reference to
RadDateInput's text box and displays the popup above it by using the
PopupContainer's height to calculate the position:
var textBox = datePicker.GetTextBox();
var popupElement = datePicker.GetPopupContainer();
var dimensions = datePicker.GetElementDimensions(popupElement);
var position = datePicker.GetElementPosition(textBox);
datePicker.ShowPopup(position.x, position.y - dimensions.height);