ComponentOne Calendar for ASP.NET: Client-Side Calendar > Calendar Client-Side Events

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

ClientOnAfterClose

Gets or sets the method to be called after the calendar is closed.

ClientOnAfterPopup

Gets or sets the method to be called after the calendar is popup.

ClientOnBeforeClose

Gets or sets the method to be called before the calendar is closed.

ClientOnBeforePopup

Gets or sets the method to be called before the calendar is popup. A false return would cancel the popup action.

ClientOnSelChange

Gets or sets the method to be called when the selection is made.

ClientOnSelectedDatesChanged

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".


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.