开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜