views:

92

answers:

2

give code to validate textbox if the textbox not contains the value except "mm-dd-yyyy" fromate it shoud display error message.

A: 

Check out the Regular Expression validator control, see MSDN. And matching dates with regular expressions is a very common task.

Jakob Gade
A: 

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= "-";
Salil