I'm using Kendo datepicker to allow the user to enter the date. However I want to allow the user to type only date in particular format, i.e., MM/DD/YYYY
<input kendo-date-picker placeholder="from" class="form-control" id="fromDate" ng-keydown="validateDateEntered()" />
Now when a user enters something in the input field, I do the validation like:
$scope.validateDateEntered= function () {
$("#fromDate").kendoDatePicker({
format: "MM/dd/yyyy"
});
}
Doing this still allows a user to type invalid characters. Just want to understand how can I allow user to only enter date in MM/DD/YYYY format and discard everything else.