disable all previous dates in angular bootstrap datetimepicker
问题 I am creating a project using angularjs. I am integrated the angulardatetimepicker from the link: https://github.com/dalelotts/angular-bootstrap-datetimepicker. Now I want to disable all previous dates from current date. Here is my code: function beforeRender($view, $dates, $leftDate, $upDate, $rightDate) { var minDate = moment().startOf($view).valueOf(); for(var i=1; i < $dates.length;i++) { if(new Date().getTime() > $dates[i].utcDateValue) { $dates[i].selectable = false; } } } This code not