Binding a Java Date Picker to a textbox in formview ASP.NET C#
<p>I'm having some problem binding the value of a date picker to a textbox in formview asp.net. I've tried to a put a date picker in ASP.NET and JavaScript which calls on a class file in calendar.css so far it can display the date but if I tried to insert it to a record it always return null. So how can I bind it so it can add the date value to the record? </p>

<p>Help would be much appreciated. </p>

<p>Thanks in advance ;)</p>

<p>Here's a sample of my code. I want to bind the 'input text' to the 'dateborrowedTextBox'</p>

<pre><code>&lt;InsertItemTemplate&gt;
    Book Title:
    &lt;asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="booktitleDataSource" DataTextField="booktitle" 
        DataValueField="bookid" SelectedValue='&lt;%# Bind("bookid", "{0}") %&gt;'&gt;
    &lt;/asp:DropDownList&gt;
    &lt;asp:SqlDataSource ID="booktitleDataSource" runat="server" 
        ConnectionString="&lt;%$ ConnectionStrings:LibrarySystemConnectionString %&gt;" 
        SelectCommand="SELECT [bookid], [booktitle] FROM [TblBooks]"&gt;
    &lt;/asp:SqlDataSource&gt;
    &lt;br /&gt;

    Employee PIN:
    &lt;asp:TextBox ID="employeeidTextBox" runat="server" 
        Text='&lt;%# Bind("employeeid") %&gt;' /&gt;
    &lt;br /&gt;
    Department:
    &lt;asp:TextBox ID="departmentTextBox" runat="server" 
        Text='&lt;%# Bind("department") %&gt;' /&gt;
    &lt;br /&gt;
</code></pre>

<p>Date borrowed:</p>

<pre><code>    &lt;%--&lt;asp:TextBox ID="dateborrowedTextBox" runat="server" 
        Text='&lt;%# Bind("dateborrowed") %&gt;' /&gt;--%&gt;

    &lt;input type="text" name="dateborrowedTextBox" readonly="readonly" id="dateborrowedTextBox"&gt; 
    &lt;a href="#" onclick="cdp1.showCalendar(this, 'dateborrowedTextBox'); return false;"&gt;Date Picker
    &lt;/a&gt;

    &lt;br /&gt;

    &lt;asp:Button ID="InsertButton" runat="server" CausesValidation="True"
        CommandName="Insert" Text="Insert" /&gt;
    &lt;asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" 
        CommandName="Cancel" Text="Cancel" /&gt;
&lt;/InsertItemTemplate&gt;
</code></pre>
