Ajax Calendar Extender

Calendar Extender

Calendar control is used to automatically popup the calendar when user click on a control like text box and automatically hiding after user select the date and the selected date is displayed in text box.

Target control ID :

Popup Position : Used to specify the position where to popup the calendar for the target control

Popup Button ID : Used to specify ID of a Button control clicking on which the calendar has to popup. When this property was not set then clicking on target control itself with popup the calendar.

Format : Used to specify the format for date to be displayed in the target control. While specifying the format use small d for the day, capital M for month & small y for the year.

Example

The following example demonstrates how to use the calendar extender.

Add a page to the website and then place a Toolkit script manager & a text box on a and set ID of textbox as T1.

Within html source of the page take a calendar extender and set following properties to it.

<asp: CalendarExtender ID=calendarExtendar1 runat=”server” TargetcontrolID=”T1” popupposition =”Right” format=”dd/mm/yyyy”/>

At runtime when you click on the text box the calendar will pop up on right side of the text box, the selected date will be displayed in text box & calendar will be hidden