I try to validate my model that has a date with fluentvalidation:
web.config has:
The kendo culture stuff is in place:
RuleFor(x => x.Aanvang)
.InclusiveBetween(new DateTime(2008,01,01), new DateTime(2100, 01, 01)).WithMessage("Wrong");web.config has:
<globalization uiCulture="nl-NL" culture="nl-NL" enableClientBasedCulture="true" />The kendo culture stuff is in place:
<script src="@Url.Content("~/Scripts/kendo/2016.2.504/kendo.aspnetmvc.min.js")"></script><br><script src="@Url.Content("~/Scripts/cultures/kendo.culture.nl-NL.min.js")"></script> Now when i enter 05-05-2015 in the datepicker, it throws the "Wrong" error. While it is accepted when i comment the fluentvalidator out. I figured that the gegenerated html is:
<input data-val="true" data-val-date="The field Aanvang must be a date." data-val-range="Onwaarschijnlijk" data-val-range-max="01/01/2100 00:00:00" data-val-range-min="01/01/2008 00:00:00" data-val-required="'Aanvang' mag niet leeg zijn." id="Aanvang" name="Aanvang" type="text" value="1-1-0001" data-role="datepicker" class="k-input k-invalid" role="combobox" aria-expanded="false" aria-owns="Aanvang_dateview" aria-disabled="false" aria-readonly="false" data-bind="value:Aanvang" style="width: 100%;" aria-activedescendant="01ceca7f-c8ee-45ed-87b9-e1357df3799c_cell_selected" aria-invalid="true">
That shows 01/01/2008 instead of 01-01-2008 format, nut sure if this is the problem, but it is differant and the only thing related thing i could find. Any advice?
as
