Hello i got some problem i have manage to use kendo picker to make my date and display the date format is wrong but however i couldnt remove the error message alway when the format day is set correctly here what i mean in my picture below
When error it display this as this is not the correct format for date
However when i change my error format to the correct one is not removing the error message
Here my code for the kendo picker function
$(function () {
var viewModel = kendo.observable({
selectedDate: new Date(),
});
kendo.bind($("#change-date-collection1"), viewModel);
$("#change-date-collection1").kendoValidator({
rules: {
// Implement your custom date validation.
dateValidation: function (input, params) {
if (input.is("[name='date']") && input.val() != "") {
input.attr("data-datevalidation-msg","Not a valid date in dd/MM/YYYY format!");
var date = kendo.parseDate(input.val(), "dd/MM/yyyy");
if (date) {
return true;
}
return false;
}
return true;
}
},
messages: { //custom rules messages
datevalidation: function (input) {
// Return the message text.
return input.attr("data-val-datevalidation");
}
}
});
})
I would like that error be hide when the format is correct and show when the format is wrong for the date