<%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Calendar.Functionality.ClientSideEvents.DefaultCS" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<script type="text/javascript">
//<![CDATA[
function OnPopupOpening(sender, args) {
logEvent("OnPopupOpening fired by " + sender.get_id() + "<br />");
}
function OnPopupClosing(sender, args) {
logEvent("OnPopupClosing fired by " + sender.get_id() + "<br />");
}
function OnDateSelected(sender, e) {
if (e.get_newDate() != null) {
logEvent("OnDateSelected: " + e.get_newDate().toDateString() + " selected in " + sender.get_id() + "<br />");
}
else {
logEvent("OnDateSelected: Date cleared in " + sender.get_id() + "<br />");
}
}
function OnMonthSeleced(sender, e) {
logEvent("OnMonthSeleced fired by " + sender.get_id() + "<br />");
}
function OnYearSelected(sender, e) {
logEvent("OnYearSelected fired by " + sender.get_id() + "<br />");
}
//]]>
</script>
<div class="demo-container size-thin" runat="server" id="containerDiv">
<h2>RadMonthYearPicker: </h2>
<telerik:RadMonthYearPicker RenderMode="Lightweight" runat="server" ID="RadMonthYearPicker1">
<ClientEvents OnMonthSelected="OnMonthSeleced" OnYearSelected="OnYearSelected"
OnPopupOpening="OnPopupOpening" OnPopupClosing="OnPopupClosing" OnDateSelected="OnDateSelected"></ClientEvents>
</telerik:RadMonthYearPicker>
</div>
<qsf:EventLogConsole runat="server" ID="EventLogConsole1"></qsf:EventLogConsole>
</form>
</body>
</html>