【问题标题】:Keith Wood Datepick inMonth VariableKeith Wood Datepick inMonth 变量
【发布时间】:2013-04-05 02:23:23
【问题描述】:

我正在使用 Keith Wood 的 Datepick,并尝试使用 onDate 找到的 here 函数来阻止特定的日期范围。

inMonth 参数的值和用途是什么?当我在上面指向 Keith Wood 网站的链接中包含“国庆日”示例中看到的 if (inMonth) 语句时,我的 Rails 网站给出了错误 Uncaught TypeError: Cannot read property 'dateClass' of undefined

感谢任何见解。谢谢。

【问题讨论】:

    标签: javascript datepicker


    【解决方案1】:

    错误是由其他原因引起的,但inMonth 变量是为了确保onDate 参数中使用的函数不适用于当前月份显示的其他月份的日期。例如,当您在 4 月份时,它会阻止 onDate 样式应用到 3 月 30 日。

    【讨论】:

      【解决方案2】:

      函数 onDate 必须返回值看起来像这样 { dateClass: 'CSSclassName', selectable: true, title: ''}

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-02-12
        • 1970-01-01
        • 1970-01-01
        • 2023-03-08
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多