Glossary Item Box

Controls: InputDate

See Also AspLib component library Send comments on this topic.

InputDate client-side API

InputDate has next client side events: 

Client-side event Description
onBeforeChange Occurs when the selected date is about to be changed.
onChange Occurs when the selected date is changed.
onIsNotValid Occurs when the user tries to select an invalid date.


Also InputDate has some client-side API functions to easily manipulate with control and its value without postback.

Client-side API functions list:

Function name Description
al_InputDate_SetEnable(clientID, isEnable) Enables or disables the InputDate control with given identifier clientID, new state sets with isEnable value
al_InputDate_IsEnabled(clientID) Returns is the control enabled or not
al_InputDate_SetVisible(clientID, isVisible) Shows or hides the control with identifier clientID, new state depends on isVisible value
al_InputDate_IsVisible(clientID) Returns is the control visible or not
al_InputDate_SetValue(clientID, year, month, day) Sets the control's date - set year to year, month to month, day to day
al_InputDate_GetValue(clientID) Gets the control's date - returns the JavaScript Date object with selected date or null if nothing selected
al_InputDate_SetMinDate(clientID, year, month, day) Setting new minimal date for the InputDate control. The date sets only on client side and doesn't change any server settings.
al_InputDate_SetMaxDate(clientID, year, month, day) Setting new maximal date for the InputDate control. The date sets only on client side and doesn't change any server settings.

 

Example:

<cc1:InputDate ID="InputDate1" runat="server"></cc1:InputDate>

<input id="btn1" onclick="al_InputDate_SetEnable('InputDate1', false);" type="button" value="Disable InputDate" />

<input id="btn2" onclick="al_InputDate_SetEnable('InputDate1', true);" type="button" value="Enable InputDate" />

<input id="btn2" onclick="al_InputDate_SetVisible('InputDate1', true);" type="button" value="Show InputDate" />

<input id="btn2" onclick="al_InputDate_SetVisible('InputDate1', false);" type="button" value="Hide InputDate" />

<input id="btn2" onclick="al_InputDate_SetValue('InputDate1', 2006, 6, 15);" type="button" value="Set InputDate value to '15 June 2006'" />

<input id="btn2" onclick="alert(al_InputDate_GetValue('InputDate1'));" type="button" value="Get InputDate value" />

Controls: InputDate

 

 


© 2002-2007 Astron Digital. All Rights Reserved.