I am working on kendo ui DatePicker
,I want to set min date to yesterday.
Could anyone help me?
I have tried this
var minDate = date.setDate((new Date()).getDate() - 1);
but of no use.
here is my code.
<body>
<div id="example" ng-app="KendoDemos">
<div class="demo-section k-content"ng-controller="MyCtrl">
<div class="box-col">
<h4>Select date:</h4>
<input kendo-date-picker
ng-model="dateString"
k-options="monthSelectorOptions"
k-ng-model="dateObject"
/>
</div>
<style>
.box-col {
width: 400px;
}
</style>
</div>
<script>
angular.module("KendoDemos", [ "kendo.directives" ])
.controller("MyCtrl", function($scope){
var date = new Date();
$scope.monthSelectorOptions = {
min: date
};
})
</script>