Help complete calendar control code

Hi guys,

I have an calendar control that should an input and a calendar control. when the user selects the calendar button, it shows a calendar control, but if i select a date, the date selected should get populated on the input. I found a calendar which only partially work. It opens up but doesnt pass the selected date to the calendar control. also it doesnt move the forward or backward when the next or previous months link is pressed.
It seems it has something missing. Anyone can help complete the missing bit please?

The best way to see the effect is to compile it and run the code below:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 
    Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="">
<head id="Head1" runat="server">
    <script type="text/javascript">
        function ToggleCalendar()
            var pnlCalendar = self.document.getElementById('pnlCalendar');
            if ( == 'none')
        function ShowHideCalendar(CanShow)
            var pnlCalendar = self.document.getElementById('pnlCalendar');
            if (CanShow==true)
       = "block";
                var t = setTimeout("ShowHideCalendar(false)", 5000);
       = "none";
    <form id="form1" runat="server">
        <asp:TextBox runat="server" ID="txtDate" 
        <button onclick="ToggleCalendar()">...
        <div id="pnlCalendar" style="display:none">
            <asp:Calendar runat="server" ID="clrDate"     >
             <DayHeaderStyle Font-Size="X-Small" />
                <DayStyle Font-Size="X-Small" />
                <OtherMonthDayStyle ForeColor="GrayText" />
                <TitleStyle Font-Size="X-Small"  Font-Bold="true" 
                    BackColor="Silver" />

Thanks in advance

Have you considered using ajax extender?

Yes but my host does not support ajax

Try searching the net for jquery calendar. jQuery will make your life very easy.

If all you are looking for is a simple date picker to populate a textbox, i would recommend jQuery as well. Add jQuery to your project and something like the jQuery Date Input and you are good to go.