【问题标题】:datepicker-options being ignored for bootstrap datepicker引导日期选择器忽略日期选择器选项
【发布时间】:2015-11-10 21:23:40
【问题描述】:

来自http://angular-ui.github.io/bootstrap/#/top 它说我可以在 json 文件中传递我的所有选项,但由于某种原因我无法让它工作。我一直在玩页面提供参考的plunkr。

http://plnkr.co/edit/7Sa89G5R17erJrVRxypl?p=preview

$scope.dateOptions = {
    showWeeks: false,
    formatDayTitle: 'MMMM yyyy',
    formatDay: 'd',
    isDisabledMonths: false,
    showButtonBar: false
};

在我的标记中

 <uib-datepicker ng-model="dt" datepicker-options="dateOptions" min-date="minDate" class="well well-sm" custom-class="getDayClass(date, mode)"></uib-datepicker>

但是日期选择器仍然显示周数

【问题讨论】:

    标签: javascript angularjs twitter-bootstrap datepicker


    【解决方案1】:

    datepicker-options 只适用于弹窗

    我建议如下:

    <uib-datepicker ng-model="dt" show-weeks=false  ....
    

    【讨论】:

    • 哦,措辞让我感到困惑。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2014-04-22
    • 2012-11-02
    • 1970-01-01
    • 1970-01-01
    • 2016-07-03
    • 2015-09-22
    相关资源
    最近更新 更多