<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Popup.aspx.cs" Inherits="Popup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Wybór daty</title>
    <script language="javascript">
        function SetDate(dateToSet)
        {
            // Pobranie nazwy pola tekstowego z querystring.
            controlName = window.location.search.substr(1).substring(8);
            // wpisanie do pola wybranej daty
            window.opener.document.forms[0].elements[controlName].value = dateToSet;
            // zamknięcie okna
            self.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Calendar ID="calPopup" runat="server" BackColor="White" 
        BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
        Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" 
        Height="100%" Width="100%" 
        OnDayRender="calPopup_DayRender" >
        <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
        <SelectorStyle BackColor="#CCCCCC" />
        <WeekendDayStyle BackColor="#FFFFCC" />
        <OtherMonthDayStyle ForeColor="#808080" />
        <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
        <NextPrevStyle VerticalAlign="Bottom" />
        <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
        <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
    </asp:Calendar>
    </div>
    </form>
</body>
</html>
