0

A have the following date time picker

<input  kendo-date-time-picker k-options="myOptions"/ >

With following options:

    function setMaxDate() {
    $scope.myOptions = {
        min: $scope.mindate,
        max: new Date(),
        close: function () {
            $scope.dateValidation = false;
        },
        parseFormats: ['yyyy-MM-ddTHH:mm:ss'],
        format: 'MM/dd/yyyy HH:mm',
        timeFormat: 'HH:mm'
    }
}

When user clicks the calender icon the calender is loading fine with out the future dates.(Last date is set to current date). If user type and enter a future date it is not getting validated. How can I acheive that ?

udaya726
  • 1,010
  • 6
  • 21
  • 41

1 Answers1

0

You can either:

  1. Prohibit the user from entering manual datetimes by doing $("input.DateTimePicker").attr("onkeydown", "return false;");
  2. Add a custom validator to validate the user's input yourself using kendo's custom validation rules
philr
  • 1,860
  • 1
  • 21
  • 31