give code to validate textbox if the textbox not contains the value except "mm-dd-yyyy" fromate it shoud display error message
give code to validate textbox if the textbox not contains the value e开发者_运维百科xcept "mm-dd-yyyy" fromate it shoud display error message.
Check out this link Javascript mm/dd/yyy link
To convert it into the "mm-dd-yyyy" format just comment out(or replace) this code
var dtCh= "/";
And Add or With
var dtCh= "-";
Check out the Regular Expression validator control, see MSDN. And matching dates with regular expressions is a very common task.
精彩评论