I have 2 calendar controls.
1 for arrival date and 1 for departure date
i am having ahard time with the second one so it only shows on image click. Â also it does not look like the 1st one. Â
i will paste code below so u can give me suggestions
@ Page Language="VB" SmartNavigation="True" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!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">
  <script type="text/javascript">
   Â
    function displayCalendar()
    {
      var datePicker = document.getElementById('d
atePicker'
);
      datePicker.style.display = 'block';
    }
 Â
  </script>
    <script type="text/javascript">
   Â
    function display()
    {
      var div1 = document.getElementById('d
iv1');
      div1.style.display = 'block';
    }
 Â
  </script>
<script type="text/javascript"> Â
  Â
  function phoneFormat(phoneNum,defau
ltAreaCode
){
     var p = phoneNum.value
     var looksFuncky = true;
       p=p.replace("(","")
       p=p.replace(")","")
       p=p.replace(/-/g,"")
       p=p.replace(/ /g,"")
       if (isNaN(p)==false){
          if(p.length == 10){
             phoneNum.value = "(" + p.substring(0,3) + ") " + p.substring(3,6) + "-" + p.substring(6,10);
             looksFuncky = false;
          }
            Â
          if(p.length == 7){
             phoneNum.value = "(" + defaultAreaCode + ") " + p.substring(0,3) + "-" + p.substring(3,7);
             looksFuncky = false;
          }
       }
      if(p.length == 0)
        looksFuncky = false;  Â
  Â
  return looksFuncky ;
}
  </script>
    <style type="text/css">
    #datePicker
    {
      display:none;
      position:absolute;
      border:solid 2px black;
      background-color:white;
    }
      #div1
    {
      display:none;
      position:absolute;
      border:solid 2px black;
      background-color:white;
    }
    .content
    {
      width:400px;
      background-color:white;
      margin:auto;
      padding:10px;
    }
    html
    {
      background-color:silver;
    }
  </style>
  <title>Memorial Day Invite</title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body >
<table width="721" height="904" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
      <tr>
           <td colspan="2">
                 <img src="images/memorialdayban
ner_01.jpg
" width="211" height="279" alt=""/></td>
           <td><img src="images/memorialdayban
ner_02.jpg
" width="297" height="279" alt=""/></td>
           <td colspan="2">
                 <img src="images/memorialdayban
ner_03.jpg
" width="213" height="279" alt=""/></td>
      </tr>
      <tr>
           <td background="images/memoria
ldaybanner
_04.gif">
                 <img src="images/memorialdayban
ner_04.gif
" width="43" height="515" alt=""></td>
           <td colspan="3" valign="top" bgcolor="#FFFFFF"><p class="headline">Three of international motorsports’ annual crown jewels are coming this May.<br>
            Just Marketing International is pleased to invite you and a guest to choose one and join us! We will provide complete complimentary event credentials and VIP hospitality. Experience the marketing power of motorsports that has become a staple of Fortune 500 companies worldwide.</p>
            <p align="left" class="headline">DATE: Sunday, May 27, 2007<br>
             <br>
             REGISTER BELOW IN OUR ONLINE WEB FORM <br>
          <br>
            </p>
            <table width="100%" border="0">
      <tr>
       <td width="25%" valign="top"><div align="center"><img src="images/formula1.jpg" width="176" height="113"></div></td>
       <td width="75%" valign="middle" class="headlinenotbold"><s
pan class="headline">Grand Prix de Monaco</span><br>
        Formula One World Championship<br>
       Principality of Monaco</td>
      </tr>
      <tr>
       <td valign="top"><div align="center"><img src="images/indycar.jpg" width="154" height="124"></div></td>
       <td valign="middle" class="headlinenotbold"><s
pan class="headline">91st Annual Indianapolis 500</span><br>
        IndyCar<br>
       Indianapolis Motor Speedway - Indianapolis, Indiana</td>
      </tr>
      <tr>
       <td valign="top"><div align="center"><img src="images/nextel.jpg" width="155" height="119"></div></td>
       <td valign="middle" class="headlinenotbold"><s
pan class="headline">Coca-Cola
600</span><br>
        NASCAR Nextel Cup Series<br>
       Lowe’s Motor Speedway - Charlotte, North Carolina</td>
      </tr>
     </table>
            <p class="headline"> </p
>
            <form id="form1" runat="server"><div>
  <table width="100%" border="0" cellspacing="2" cellpadding="1">
    <tr>
      <td width="179" class="Panels" style="width: 140px">
        Select Event</td>
      <td class="OptionFields" width="415">
        <asp:DropDownList ID="events" runat="server" DataSourceID="SqlDataSourc
e3" DataTextField="EventName" DataValueField="EventName"
>
        </asp:DropDownList>
       <asp:RequiredFieldValidato
r ID="RequiredFieldValidator
3" runat="server" ControlToValidate="events"
          ErrorMessage="Event is required"></asp:RequiredFi
eldValidat
or></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">First Name</td>
     <td width="415" class="OptionFields"><asp:
TextBox ID="firstname" runat="server"></asp:TextB
ox>
      <asp:RequiredFieldValidato
r ID="RequiredFieldValidator
1" runat="server" ErrorMessage="First Name is required" ControlToValidate="firstna
me"></asp:
RequiredFi
eldValidat
or></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">Last Name</td>
     <td class="OptionFields"><asp:
TextBox ID="lastname" runat="server"></asp:TextB
ox>
      <asp:RequiredFieldValidato
r ID="RequiredFieldValidator
2" runat="server" ErrorMessage="last name is required" ControlToValidate="lastnam
e"></asp:R
equiredFie
ldValidato
r></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">Email Address</td>
     <td class="OptionFields"><asp:
TextBox ID="email" runat="server"></asp:TextB
ox>
      <asp:RegularExpressionVali
dator ID="RegularExpressionValid
ator1" runat="server" ControlToValidate="email"
      ErrorMessage="a valid email address is required" ValidationExpression="\w+(
[-+.']\w+)
*@\w+([-.]
\w+)*\.\w+
([-.]\w+)*
"></asp:Re
gularExpre
ssionValid
ator></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">Phone Number</td>
     <td class="OptionFields"><asp:
TextBox ID="phoneNumber" runat="server"></asp:TextB
ox>
      <asp:RegularExpressionVali
dator ID="RegularExpressionValid
ator3" runat="server" ControlToValidate="phoneNu
mber"
      ErrorMessage="A phone number is required  " ValidationExpression="((\(
\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">
</asp:Regu
larExpress
ionValidat
or></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Work Phone</td>
      <td class="OptionFields" style="height: 17px">
        <asp:TextBox ID="workphone" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Cell Phone</td>
      <td class="OptionFields" style="height: 17px">
        <asp:TextBox ID="cellphone" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">Address</td>
     <td class="OptionFields"><asp:
TextBox ID="address" runat="server"></asp:TextB
ox>
      <asp:RequiredFieldValidato
r ID="RequiredFieldValidator
4" runat="server" ErrorMessage="address is required" ControlToValidate="address
"></asp:Re
quiredFiel
dValidator
></td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">City</td>
     <td class="OptionFields"><asp:
TextBox ID="city" runat="server"></asp:TextB
ox>
      <asp:RequiredFieldValidato
r ID="RequiredFieldValidator
5" runat="server" ErrorMessage="city is required" ControlToValidate="city"><
/asp:Requi
redFieldVa
lidator></
td>
    </tr>
    <tr>
     <td class="Panels" style="width: 140px">Zip</td>
     <td class="OptionFields"><asp:
TextBox ID="zip" runat="server"></asp:TextB
ox>
      <asp:RegularExpressionVali
dator ID="RegularExpressionValid
ator2" runat="server" ControlToValidate="zip"
      ErrorMessage="zip code is required" ValidationExpression="\d{5
}(-\d{4})?
"></asp:Re
gularExpre
ssionValid
ator></td>
    </tr>
    <tr>
     <td class="Panels" style="height: 17px; width: 140px;">State or Province</td>
     <td class="OptionFields" style="height: 17px">
       <asp:TextBox ID="state" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Country</td>
      <td class="OptionFields" style="height: 17px">
        <asp:DropDownList ID="country" runat="server">
        <asp:ListItem></asp:ListIt
em>
          <asp:ListItem>USA</asp:Lis
tItem>
          <asp:ListItem>Canada</asp:
ListItem>
          <asp:ListItem>France</asp:
ListItem>
          <asp:ListItem>Germany</asp
:ListItem>
          <asp:ListItem>Japan</asp:L
istItem>
          <asp:ListItem>Netherlands<
/asp:ListI
tem>
          <asp:ListItem>Switzerland<
/asp:ListI
tem>
          <asp:ListItem>United Kingdom</asp:ListItem>
        </asp:DropDownList></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        T-shirt Size</td>
      <td class="OptionFields" style="height: 17px">
        <asp:DropDownList ID="tshirt" runat="server">
        <asp:ListItem></asp:ListIt
em>
          <asp:ListItem>XXL</asp:Lis
tItem>
          <asp:ListItem>XL</asp:List
Item>
          <asp:ListItem>L</asp:ListI
tem>
          <asp:ListItem>M</asp:ListI
tem>
          <asp:ListItem>S</asp:ListI
tem>
        </asp:DropDownList></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Assistant Name</td>
      <td class="OptionFields" style="height: 17px">
        <asp:TextBox ID="assistant" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Assistant Phone</td>
      <td class="OptionFields" style="height: 17px">
        <asp:TextBox ID="assistantphone" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Assistant Email</td>
      <td class="OptionFields" style="height: 17px">
        <asp:TextBox ID="assistantemail" runat="server"></asp:TextB
ox></td>
    </tr>
    <tr>
      <td class="Panels" colspan="1" style="height: 17px">
        Intended Arrival Date</td>
      <td class="OptionFields" style="height: 17px" colspan="2">  Â
 Â
  <asp:TextBox
    id="txtEventDate"
    Runat="server" />
  <img src="Calendar.gif" onclick="displayCalendar()
" />
 Â
  <div id="datePicker">
  <asp:Calendar
    id="calEventDate"
    OnSelectionChanged="calEve
ntDate_Sel
ectionChan
ged"
    Runat="server" /> </div>
       </td>
    </tr>
    <tr>
      <td class="Panels" style="width: 140px; height: 17px">
        Intended Departure Date</td>
      <td class="OptionFields" style="height: 17px">
         <asp:TextBox
    id="txtEvent"
    Runat="server" />
  <img src="Calendar.gif" onclick="display()" />
 Â
  <div id="Div1">
  <asp:Calendar
    id="Calendar1"
    OnSelectionChanged="Calend
ar1_Select
ionChanged
"
    Runat="server" /> </div></td>
    </tr>
    <tr>
     <td colspan="2" style="text-align: right">
       <asp:ImageButton ID="submit" runat="server" ImageUrl="~/images/submit.
jpg" /></td>
     </tr>
   </table>
   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:db1Conne
ctionStrin
g %>"
      ProviderName="<%$ ConnectionStrings:db1Conne
ctionStrin
g.Provider
Name %>" Â InsertCommand="INSERT INTO [reg] ( [EventType], [Firstname], [Lastname], [Email], [Phonenumber], [Workphone], [Cellphone], [Address], [City], [Zip], [State], [Country], [Tshirt], [Assistant], [AssistantPhone], [AssistantEmail], [Arrival], [Departure]) VALUES (@EventType,@Firstname, @Lastname, @Email, @Phonenumber, @workphone, @cellphone, @Address, @City, @Zip, @State, @country, @Tshirt, @Assistant, @AssistantPhone, @AssistantEmail, @Arrival, @Departure)" >
    <InsertParameters>
    Â
         <asp:FormParameter  FormField="events" Name="EventType" Type="String" />
       <asp:FormParameter FormField="firstname" Name="Firstname" Type="String" />
       <asp:FormParameter FormField="lastname" Name="Lastname" Type="String" />
       <asp:FormParameter FormField="email" Name="Email" Type="String" />
       <asp:FormParameter FormField="phonenumber" Name="Phonenumber" Type="String" />
        <asp:FormParameter  FormField="Workphone"  Name="Workphone" Type="String" />
        <asp:FormParameter  FormField="Cellphone"  Name="Cellphone" Type="String" />
       <asp:FormParameter FormField="Address" Name="Address" Type="String" />
       <asp:FormParameter FormField="city" Name="City" Type="String" />
       <asp:FormParameter FormField="zip" Name="Zip" Type="String" />
       <asp:FormParameter FormField="state" Name="State" Type="String" />
      <asp:FormParameter  FormField="Country"  Name="Country" Type="String" />
       <asp:FormParameter  FormField="Tshirt"  Name="Tshirt" Type="String" />
        <asp:FormParameter  FormField="Assistant"  Name="Assistant" Type="String" />
      <asp:FormParameter  FormField="AssistantPhone"
 Name="AssistantPhone" Type="String" />
       <asp:FormParameter  FormField="AssistantEmail"
 Name="AssistantEmail" Type="String" />
        <asp:FormParameter  FormField="txtEventDate" Name="Arrival" Type="DateTime" />
       <asp:FormParameter  FormField="txtEvent"  Name="Departure" Type="DateTime" />
   Â
    </InsertParameters>
   </asp:SqlDataSource>
  Â
  <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:db1Conne
ctionStrin
g %>"
      ProviderName="<%$ ConnectionStrings:db1Conne
ctionStrin
g.Provider
Name %>" SelectCommand="SELECT * FROM [events]"> </asp:SqlDataSource>
  </div>
  </form></td>
           <td background="images/memoria
ldaybanner
_06.gif">
                 <img src="images/memorialdayban
ner_06.gif
" width="49" height="515" alt=""></td>
      </tr>
      <tr>
           <td colspan="5">
                 <img src="images/memorialdayban
ner_07.gif
" width="721" height="109" alt=""></td>
      </tr>
      <tr>
           <td>
                 <img src="images/spacer.gif" width="43" height="1" alt=""></td>
           <td>
                 <img src="images/spacer.gif" width="168" height="1" alt=""></td>
           <td>
                 <img src="images/spacer.gif" width="297" height="1" alt=""></td>
           <td>
                 <img src="images/spacer.gif" width="164" height="1" alt=""></td>
           <td>
                 <img src="images/spacer.gif" width="49" height="1" alt=""></td>
      </tr>
</table>
<div align="center">
 <!-- End ImageReady Slices -->
</div>
</body>
</html>