Version

CalendarOpening Property

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

This action can be canceled.

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.CalendarOpening = "WebDatePicker_CalendarOpening"
WebDatePicker1.ClientSideEvents.CalendarOpening = "WebDatePicker_CalendarOpening";
// The client event 'CalendarOpening' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the CancelEventArgs

function WebDatePicker_CalendarOpening(sender, e) {

        if (!confirm("Are you sure you want to open the calendar?"))

        //Cancels the CalendarOpening event
        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