我想设置Max-length使用input元素,angularJS但对我不起作用。下面是我尝试过的。
<div class="billcutofdate vLine vLineRight" id="SAPExecutiveBillDate">
<a><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Billing Cut-off Date <span class="badge">{{BillCutdate}}</span></a>
<div class="setcutofdate">
<div class="inputNumber clearfix"><input ng-maxlength="2" type="number" step="1" value="0" class="form-control" ng-model="BillCutdateSet" /></div>
<button class="btn btn-default customBtn" ng-click="changeBillDate()"><i class="fa fa-calendar-check-o" aria-hidden="true"></i> Set Date</button>
</div>
</div>
谁能告诉我为什么它不起作用,因为我是angularJS的新手
更新
重现错误
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.5/angular.min.js"></script>
<input ng-minlength="1" ng-maxlength="2" min="1" max="31" type="number" step="1" value="0" class="form-control" ng-model="BillCutdateSet" />
胡说叔叔
相关分类