Hi,
I use Kendo UI ASP.NET MVC with VB.NET and jquery for client validation. My question is:
How I can format the date into ‘dd.mm.yyyy’. I also want to use the @Html.EditorFor() and the client validation.
Setting up the Model:
<DataType(DataType.[Date],
ErrorMessage:="Datumsformat ungültig")>
<DisplayFormat([ApplyFormatInEditMode]:=True,
[DataFormatString]:="{0:dd.MM.yyyy}")>_
Public Property Geburtstag As Nullable(Of DateTime)
Setting up the View:
<td class="editor-label" style="width: 100px">
@Html.LabelFor(Function(model) model.Geburtstag)
</td>
<td class="editor-field">
@Html.EditorFor(Function(model) model.Geburtstag)
@Html.ValidationMessageFor(Function(model) model.Geburtstag)
</td>
The client validation doesn’t accept the format ‘dd.MM.yyyy’ only the ‘dd/MM/yyyy’ format.
How I can overwrite the client validation for the date format?
I suppose the validation is in a jquery file.
Thanks for help
I use Kendo UI ASP.NET MVC with VB.NET and jquery for client validation. My question is:
How I can format the date into ‘dd.mm.yyyy’. I also want to use the @Html.EditorFor() and the client validation.
Setting up the Model:
<DataType(DataType.[Date],
ErrorMessage:="Datumsformat ungültig")>
<DisplayFormat([ApplyFormatInEditMode]:=True,
[DataFormatString]:="{0:dd.MM.yyyy}")>_
Public Property Geburtstag As Nullable(Of DateTime)
Setting up the View:
<td class="editor-label" style="width: 100px">
@Html.LabelFor(Function(model) model.Geburtstag)
</td>
<td class="editor-field">
@Html.EditorFor(Function(model) model.Geburtstag)
@Html.ValidationMessageFor(Function(model) model.Geburtstag)
</td>
The client validation doesn’t accept the format ‘dd.MM.yyyy’ only the ‘dd/MM/yyyy’ format.
How I can overwrite the client validation for the date format?
I suppose the validation is in a jquery file.
Thanks for help