Version

ListOpened Property

Gets sets name of javascript function which is called after list of months, years or year groups was opened or list of years was updated with next range.
Syntax
'Declaration
 
Public Property ListOpened As String
public string ListOpened {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
WebMonthCalendar1.ClientEvents.ListOpened = "WebMonthCalendar1_ListOpened"
WebMonthCalendar1.ClientEvents.ListOpened = "WebMonthCalendar1_ListOpened";
// The client event 'ListOpened' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the CalendarListOpenedEventArgs

function WebMonthCalendar1_ListOpened(sender, e) {
    //Gets the id of the list; 1 – list of Months , 2 – list of Years, 3 – list of Decades.
    var id = e.get_id();

    //Gets the reference of the WebMonthCalendar
    var calendar = $find("WebMonthCalendar1");

    switch (id) {

        case 1:
            alert("Please select a month");

            //Shows the list of the months
            calendar.showList(1);

            break;

        case 2:
            alert("Please select a year ");

            //Shows the list of the years
            calendar.showList(2);

            break;

        case 3:
            alert("Please select a decade ");
            
            //shows the list of the decades       
            calendar.showList(3);
       }
}
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