<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ScedulerCal.aspx.cs" Inherits="Scheduler.ScedulerCal" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
window.onload = function () {
var timer;
var el = document.getElementById('Calendar1');
el.onclick = function () {
if (timer) clearTimeout(timer);
timer = setTimeout(function () { alert('<%= Calendar1.SelectedDate.Date.ToLongDateString() %>'); }, 250);
var calendarDate = '<%= Calendar1.SelectedDate.Date.ToLongDateString() %>';
document.getElementById("GridView1").style.display = 'block';
}
el.ondblclick = function () {
clearTimeout(timer);
document.getElementById("Mdl1").style.display = 'block';
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div style="width: 100%; height: 100%" id="MainDiv">
<div style="width: 70%; float: left" id="caldiv">
<asp:Calendar ID="Calendar1" runat="server" Width="98%" Height="100%" OnSelectionChanged="Calendar1_SelectionChanged"
OnDayRender="Calendar1_DayRender" BackColor="White" BorderColor="Black"
DayNameFormat="Shortest"
Font-Names="Times New Roman" Font-Size="10pt" ForeColor="Black" NextPrevFormat="FullMonth"
TitleFormat="Month" OnVisibleMonthChanged="Calendar1_VisibleMonthChanged" >
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" ForeColor="#333333"
Height="10pt" />
<DayStyle Width="14%" />
<NextPrevStyle Font-Size="8pt" ForeColor="White" />
<OtherMonthDayStyle ForeColor="#999999" />
<SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
<SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
ForeColor="#333333" Width="1%" />
<TitleStyle BackColor="Black" Font-Bold="True" Font-Size="13pt" ForeColor="White"
Height="14pt" />
<TodayDayStyle BackColor="#CCCC99" />
</asp:Calendar>
</div>
<div style="width: 27%; float: left" id="Gvdiv">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
Height="5%" >
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="Event" HeaderText="Event" />
<asp:BoundField DataField="AddedOn" HeaderText="AddedOn" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="Link1" runat="server" Text="Delete" OnClick="Link1_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<asp:Panel ID="Panel1" Style="border: Solid 1px Blue; background-color: #CCFFFF;
width: 30%" runat="server" Visible="false" BackColor="#CCCCFF">
<div style="background-color: #CCFFFF; text-align: center">
<asp:Label ID="lblE" runat="server" Text="Events On" ForeColor="Red"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server" Width="60%" Style="margin-left: 30px; background-color: Yellow"></asp:TextBox>
</div>
<div id="Name">
<asp:Label ID="Label" runat="server" Text="Name" Width="5%"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Width="30%" Style="margin-left: 30px"></asp:TextBox>
</div>
<br />
<div id="Event">
<asp:Label ID="Label2" runat="server" Text="Event" Width="5%"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Width="30%" Style="margin-left: 30px"></asp:TextBox>
</div>
<br />
<div id="Add">
<asp:Button ID="Button1" runat="server" Text="Add" Width="20%" Style="margin-left: 50px"
OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="cancel" Width="20%" />
</div>
</asp:Panel>
<asp:Button ID="Btn1" runat="server" Style="display: none" OnClick="Btn1_Click" EnableViewState="true" />
<asp:ModalPopupExtender ID="Mdl1" runat="server" TargetControlID="Btn1" PopupControlID="Panel1"
CancelControlID="Button2">
</asp:ModalPopupExtender>
</form>
</body>
</html>