We have our days in dd-MM-yyyy format and it's mostly working fine, we have a few fringe cases though where it could have the user add the wrong date in by accident and not notice when they type them.
For example 31-04 reverts the date to 01-04, is it possible to still have the formatting in place but allow the check to be done by a regex pattern? or can we distinguish which way the autocorrect goes, for example above we would want it to autochange to 30-04?
For example 31-04 reverts the date to 01-04, is it possible to still have the formatting in place but allow the check to be done by a regex pattern? or can we distinguish which way the autocorrect goes, for example above we would want it to autochange to 30-04?
@(Html.Kendo().DatePicker().Name(
"txt_"
+ Model.QuestionID.ToString()).Value(Model.AnswerModel.AnswerText).Format(
"dd-MM-yyyy"
).DateInput()
.Popup(p =>
{
p.Origin(
"bottom right"
);
p.Position(
"top right"
);
})
.Deferred().HtmlAttributes(
new
{
style =
"width:100%"
,
@id =
"txt_"
+ Model.QuestionID.ToString(),
pattern = pattern
}))