Hi!
I have problem with client-side validation. Even after I set Culture and it shows proper date format, when I submit page client-side validation fires error "The field Datum očitavanja must be a date.". Here is my code in view:
Please for some instruction. Thanks!
I have problem with client-side validation. Even after I set Culture and it shows proper date format, when I submit page client-side validation fires error "The field Datum očitavanja must be a date.". Here is my code in view:
@model ISPIS.Models.TerenskiRezultatFK
@section headCultureContent {
<
script
src
=
"@Url.Content("
~/Scripts/kendo.culture.sr-Latn-RS.min.js")"></
script
>
}
<
script
type
=
"text/javascript"
>
//set culture of the Kendo UI
kendo.culture("sr-Latn-RS");
</
script
>
@{
ViewBag.Title = "Create";
Culture = "sr-Latn-RS";
}
<
div
class
=
"editor-label"
>
@Html.LabelFor(model => model.DatumOcitavanja)
</
div
>
<
div
class
=
"editor-field"
>
@(Html.Kendo().DateTimePicker()
.Name("DatumOcitavanja")
.Value(DateTime.Now)
/*.Culture("sr-Latn-RS")*/
.Format("dd.MM.yyyy HH:mm")
.HtmlAttributes(new { style = "width:220px" })
)
@Html.ValidationMessageFor(model => model.DatumOcitavanja)
</
div
>