<div ng-show="discount.discount.days_details.monday.enable" class="add-time-block" ng-class="showInterval"> <button ng-click="discount.addInterval('monday', start_m, end_m);" class="edit blue">{{::discount.lc.b_add_period}} </button> <div class="input-group bootstrap-timepicker"> <input type="time" placeholder="hrs:mins" ng-model="start_m" value="00:00" pattern="^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$" class="timepicker-rest-from"> <strong>-</strong> <input type="time" placeholder="hrs:mins" ng-model="end_m" value="00:00" pattern="^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$" class="timepicker-rest-to"> </div> <div> <span ng-repeat="interval in discount.discount.days_details.monday.intervals">{{::interval.from}} - {{::interval.to}}<br></span> </div> </div>
The bottom line is that I use angular-bootstrap-datepicker and only version angular 1.3.5 is compatible with it, but because of this, ng-model does not work correctly. As a result, start_m and start_end will be undefined .
I cannot change the datepicker to another one, because everything is on the website by layout.
But if you put angular above 1.3.5 , for example, 1.4.9 , then there will be such an error
Controller 'select', required by directive 'ngOptions', can't be found!
<div id="datepicker0" ng-datepicker dp-options="discount.datepickersOptions.from" ng-model="discount.discount_dates.from"></div>
How can this problem be solved ?
I will attach the link to ng-bootstrap-datepicker