If you can’t get it working on the model, you could try it on the view.
@Html.TextBoxFor(m => m.ValidFrom, "{0:dd/MM/yyyy}", new {maxlength = 10})
More Related Contents:
- How to determine if using MVC4 vs MVC5 vs MVC6? [closed]
- How to use sessions in an ASP.NET MVC 4 application?
- How to change default validation error message in ASP.NET MVC?
- Can we pass model as a parameter in RedirectToAction?
- Unity Inject dependencies into MVC filter class with parameters
- How can I specify an explicit ScriptBundle include order?
- Format datetime in asp.net mvc 4
- The anti-forgery token could not be decrypted
- Redirect from asp.net web api post action
- Why is my CSS bundling not working with a bin deployed MVC4 app?
- Display DateTime value in dd/mm/yyyy format in Asp.NET MVC
- Validate object based on external factors (ie. data store uniqueness)
- Razor actionlink autogenerating ?length=7 in URL?
- MVC Custom Validation for List on Client Side
- MVC Model require true
- DataAnnotations validation (Regular Expression) in asp.net mvc 4 – razor view
- DataAnnotations dynamically attaching attributes
- MVC4 input field placeholder
- How to link HTML5 form action to Controller ActionResult method in ASP.NET MVC 4
- WebAPI Delete not working – 405 Method Not Allowed
- ASP.NET MVC 4 Application Calling Remote WebAPI
- Required attribute for an integer value
- CS0234: Mvc does not exist in the System.Web namespace
- How do I create a MVC Razor template for DisplayFor()
- MVC 4 ignores DefaultModelBinder.ResourceClassKey
- MVC 4 how to validate a non-US date with client validation?
- Include all files in a folder in a single bundle
- ASP.Net MVC DisplayFormat
- Should I use AsyncController at ASP.NET MVC 4?
- Routing with and without controller name in ASP.NET MVC 4