Calendar Client-Side Events
C1Calendar includes several client-side events that allow you to manipulate C1Calendar when the following actions occur:
• After the calendar closes.
• After the popup calendar appears.
• Before the calendar closes.
• Before the popup calendar appears.
• While the date selection is changed on the Calendar.
By using client-side code such as JavaScript you can implement many features to your Web page without the need to send information to the Web server which takes time. Thus, using client-side code increases the efficiency of your Web site.
The C1Calendar control exposes the following string properties that specify the name of the corresponding client side events (listed in the preceding table) to execute whenever the corresponding action occurs at run time:
Property |
Description |
Gets or sets the method to be called after the calendar is closed. | |
Gets or sets the method to be called after the calendar is popup. | |
Gets or sets the method to be called before the calendar is closed. | |
Gets or sets the method to be called before the calendar is popup. A false return would cancel the popup action. | |
Gets or sets the method to be called when the selection is made. | |
Gets or sets the handler for the client SelectedDatesChanged event. |
These events are useful for providing client-side interactivity. With these events you can provide more control over C1Calendar by controlling how the users interact with C1Calendar.
To process these events, you must add JavaScript functions to your Web form's source page, then have the control call these functions in response to the C1Calendar client-side events.
You can use the sever-side properties, listed in the preceding table, to specify the name of the JavaScript function that will respond to a particular client-side event. For example, to assign a JavaScript function called "ClientAfterClose" to respond to the calendar once it closes, you would set the ClientOnAfterClose property to "ClientAfterClose".
|