I'm using a Date in a ASP.NET Form.
I want to show the date with french format (day/month/year) in the UI and get it in the controler with model binding work with this.
I've this model property:
[DisplayFormat(DataFormatString = "{dd/MM/yyyy}", ApplyFormatInEditMode = true)]
public DateTime dateAudit { get; set; }
That I initiate as DateTime.Now and that show in the form:
@Html.TextBox("dateAudit", String.Format("{0:d}", Model.dateAudit.ToShortDateString(), new { @class = "datefield" }))
yeah I've put this in config too:
<globalization uiCulture="fr-FR" />
The issue is that the date shown is 3/9/2015 but should be 09/03/2015.
How to fix this?
Thanks in advance