i use mvc 5 but the jquery validate unobtrusive validates the date as MM/dd/yyyy and when i searched how to make it validates dd/MM/yyyy
i found jquery globalize to achieve this but i dont find any examples for the current version Globalize v1.1.2
All the examples i found is for the versions less than 1.x
The view
<div class="form-group">
@Html.LabelFor(model => model.Date, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Date, "dd/MM/yyyy", new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Date, "", new { @class = "text-danger" })
</div>
</div>
The metadata specified the date to be dd/MM/yyyy
[Required(ErrorMessage = " الحقل مطلوب ")]
[DisplayName("تاريخ ")]
[DisplayFormat(DataFormatString = "{dd/MM/yyyy}", ApplyFormatInEditMode = true)]
public DateTime Date { get; set; }
although that jquery validate unobtrusive validates the date as MM/dd/yyyy