Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
dd/MM/yyyy format is not working in MVC 4 for Chrome Browser through model validation ?
Posted
Comments
Sampath Lokuge 10-Apr-14 5:10am    
Can you put your code snippet ?
Gaurav Gupta A Tech Guy 11-Apr-14 0:32am    
No code snapshot is required. i defined my variable as datetime in model. and it is being validated automatically through jquery.validate.unobtrusive.min.js. and only set dataannotations for date format string.
Somasekar N 12-Feb-15 4:08am    
Same issue for me too.. is there any solution?

1 solution

Please try following in your view.
@Html.TextBox("DateBox", String.Format("{0:dd/MM/yyyy}", DateTime.Now ))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900