<%@ 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 OnClientTimeSelected(sender, e) {
logEvent("OnClientTimeSelected: " + "Old time (" + e.get_oldTime() + ") was changed with (" + e.get_newTime() + ") <br />");
}
function onLoad(sender, args) {
logEvent("Date input " + sender.get_id() + " loaded <br />");
}
//]]>
</script>
<div class="demo-container size-thin" runat="server" id="containerDiv">
<h2>RadDateTimePicker: </h2>
<telerik:RadDateTimePicker RenderMode="Lightweight" ID="RadDateTimePicker1" runat="server" MinDate="2006/1/1"
Width="100%">
<ClientEvents OnPopupOpening="OnPopupOpening" OnPopupClosing="OnPopupClosing" OnDateSelected="OnDateSelected"></ClientEvents>
<TimeView OnClientTimeSelected="OnClientTimeSelected">
</TimeView>
<DateInput runat="server" ID="DateInput">
<ClientEvents OnLoad="onLoad"></ClientEvents>
</DateInput>
</telerik:RadDateTimePicker>
</div>
<qsf:EventLogConsole runat="server" ID="EventLogConsole1"></qsf:EventLogConsole>
</form>
</body>
</html>