Version

CalendarClosed Property

Gets sets name of javascript function which is called after drop-down calendar was closed.
Syntax
'Declaration
 
Public Property CalendarClosed As String
public string CalendarClosed {get; set;}
Remarks

Update of WebDatePicker from selected date in calendar can be canceled and value can be modified.

Note: that event should not be interrupted by alert, confirm or similar action, which may break default order or timing of focus and other events of browser.

Example
WebDatePicker1.ClientSideEvents.CalendarClosed = "WebDatePicker_CalendarClosed"
WebDatePicker1.ClientSideEvents.CalendarClosed = "WebDatePicker_CalendarClosed";
// The client event 'CalendarClosed' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the TextEditorValueChangingEventArgs

function WebDatePicker_CalendarClosed(sender, e) {

     //Gets the new date selected in the drop-down calendar
     var newValue = e.get_value();

     if(!confirm("Are you sure you want to select the date '" + newValue + "'?"))
     
           //Cancels the selected date in the drop-down calendar from updating as the value of the editor
           e.set_cancel(true); 
     
 }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also