注: イベントを alert、confirm、またはその他の動作で中断しないでください。デフォルトの順序、フォーカス、またはブラウザーのその他のイベントのタイミングを損なう可能性があります。
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); } }