This is my html code
<div>
<input type="checkbox" />
<label ng-bind="months[0]"></label>
<input type="checkbox" />
<label ng-bind="months[1]"></label>
<input type="checkbox" />
<label ng-bind="months[2]"></label>
<input type="checkbox" />
<label ng-bind="months[3]"></label>
<input type="checkbox" />
<label ng-bind="months[4]"></label>
<input type="checkbox" />
<label ng-bind="months[5]"></label>
<input type="checkbox" />
<label ng-bind="months[6]"></label>
<input type="checkbox" />
<label ng-bind="months[7]"></label>
<input type="checkbox" />
<label ng-bind="months[8]"></label>
<input type="checkbox" />
<label ng-bind="months[9]"></label>
<input type="checkbox" />
<label ng-bind="months[10]"></label>
<input type="checkbox" />
<label ng-bind="months[11]"></label>
</div>
This is my array which is in the controller
var controller = app.controller('ctrl', function ($scope) {
$scope.dropdown = ["Yearly", "Monthly", "Date"];
$scope.option = 'Yearly';
$scope.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
$scope.selectedMonth = 'January';
$scope.fromdate = '';
$scope.todate = '';
});
I used jQuery date picker to get the fromdate and todate from the user.I need to disable the checkbox based on fromdate and todate. For example: If the user enters 27/8/2016 in from date and 27/10/2016 in to date, I need to disable the checkboxes of the months 1,2,3,4,5,6,7,11,12 . Any suggestions, Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire