【问题标题】:Datepicker angular directive for Bootstrap: Showing only months and yearsBootstrap 的 Datepicker 角度指令:仅显示月份和年份
【发布时间】:2014-10-01 05:36:23
【问题描述】:

我正在使用来自Angular directives for bootstrapdatepicker。我想在 datePicker 弹出窗口中只显示月份和年份,但找不到方法。

我尝试了Bootstrap datepicker 的类似方法,将其命名为dateoptions,但它不起作用。使用 datepicker-mode="month" min-mode="month" 也没有帮助。

请在此处找到The link to plunker

我们可以观察到的是点击日期选择器中的month,将其切换到月视图。那么,这是可以做到的,但是如何做到呢?

【问题讨论】:

  • 将配置更改为datepicker-mode="'month'" min-mode="'month'" 有效,但仍然存在一些问题。检查在plunker。它只设置初始模式,而不是min mode

标签: angularjs angular-ui-bootstrap


【解决方案1】:

我找到了这个话题。 他们用指令和 Jquery 解决了你的问题。 你可以看看。

Angular-ui-bootstrap - Date Picker - How can I restrict access to the date-selector in popup?

【讨论】:

    猜你喜欢
    • 2013-02-05
    • 2018-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多