Author: KenRay | Posted on: 7/29/2008 11:06:51 AM | Views : 260

I have a text box field entry on an update form that is for a date variable - date and time.  I have tried using a compare validator to check that the value entered is a valid date and time, but it appears to only accept a date, and not a time.
 Here is my existing code:
 </p><p>&nbsp;&lt;td&gt;Booking Date and Time&lt;/td&gt;
&nbsp;&lt;td&gt;&lt;asp:TextBox ID="book_datemadeTextBox" runat="server" Text='&lt;%# Bind("book_datemade") %&gt;'&gt;&lt;/asp:TextBox&gt;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:CompareValidator ID="vldBookDateValue" runat="server" ErrorMessage="The booking date is invalid" ControlToValidate="book_datemadeTextBox"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ...

Go to the complete details ...