![](/img/trans.png)
[英]Bootstrap-datepicker - Is it possible to update after each click(year, month, day)?
[英]UI Bootstrap Datepicker needs second click to update month
我正在使用UI Bootstrap Datepicker。 當我點擊選擇下個月時,datepicker本身會正確更新,但月份名稱不會更新(見圖1和2)。
但是,一旦我選擇了日期,更新月份名稱就可以了。 只有第一次出現此問題。
我使用$ templateCache來注入datepicker,如下所示:
<button type="button"
class="btn btn-default datepickerButton dateButton"
datepicker-popup="{{format}}"
ng-click="clickCalendar($event,$index,0)"
name="date"
ng-model="example.date"
is-open="example.open"
ng-change="selectDate($index)"
show-weeks="false"
min-date="Datepicker.getMinDate()"
max-date="Datepicker.getMaxDate()"
datepicker-options="dateOptions"
show-button-bar="false">
{{example.date|changeDateFormat}}</button>
您將bootstrap.js
與angular-ui-bootstrap.js
庫一起使用嗎?
這兩個庫都在處理相同的事件。 如果是這種情況,請刪除bootstrap.js
庫。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.