There is no predefined validator that handles this case. You would have to
create a custom validator to do it. If you only use server side validation,
its easy to use DateTime.Parse or ParseExact to test the string for
As the author of a popular date and time textbox (Peter's Date Package), I
have discussed the issue of merging date and time together with others. Its
my opinion that having separate date and time textboxes makes it easier both
for the user and you.
1. You can provide date specific keyboard filtering in one and time specific
2. You can offer a popup calendar on one and other tools to help enter times
on the other.
3. You can use the CompareValidator for the date text box and get client
side validation. You will have an easier time writing the client-side
validation for just handling times.
For you, its easy to split the DateTime into two strings and join them back
together on post back.
Use DateTime.Parse() on DateTextBox.Text + " " + TimeTextBox.Text
FYI: My controls include both date and time validators for my date and time
--- Peter Blum
Creator of "Professional Validation And More" at