Version

CalendarOpened Property

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

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.MinValue = new DateTime(2000, 1, 1)
WebDatePicker1.MaxValue = new DateTime(2015, 12, 31)
WebDatePicker1.ClientSideEvents.CalendarOpened = "WebDatePicker_CalendarOpened"
WebDatePicker1.MinValue = new DateTime(2000, 1, 1);
WebDatePicker1.MaxValue = new DateTime(2015, 12, 31);
WebDatePicker1.ClientSideEvents.CalendarOpened = "WebDatePicker_CalendarOpened";
// The client event 'CalendarOpened' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the EventArgs

function WebDatePicker_CalendarOpened(sender, e) {

    //Gets the reference of the WebDatePicker
    var datePicker = $find("WebDatePicker1");

    //Gets the minimum value set on the WebDatePicker
    var minValue = datePicker.get_minValue();

    //Gets the maximum value set on the WebDatePicker
    var maxValue = datePicker.get_maxValue();

    alert("Please select a date between '" + minValue + "' and  '" + maxValue + "'.");
    

}
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