我正在使用Keith Wood的Datepick,並試圖用onDate
函數發現here來屏蔽特定日期範圍。Keith Wood Datepick inMonth變量
inMonth
參數的價值和用途是什麼?當我在上述Keith Wood網站鏈接的「國家日」示例中包含if (inMonth)
聲明時,我的Rails網站給出了錯誤Uncaught TypeError: Cannot read property 'dateClass' of undefined
。
任何洞察力是讚賞。謝謝。
我正在使用Keith Wood的Datepick,並試圖用onDate
函數發現here來屏蔽特定日期範圍。Keith Wood Datepick inMonth變量
inMonth
參數的價值和用途是什麼?當我在上述Keith Wood網站鏈接的「國家日」示例中包含if (inMonth)
聲明時,我的Rails網站給出了錯誤Uncaught TypeError: Cannot read property 'dateClass' of undefined
。
任何洞察力是讚賞。謝謝。
錯誤是由於其他原因導致的,但inMonth
變量用於確保參數onDate
中使用的函數不適用於當前月份中顯示的其他月份的日期。例如,它防止onDate
風格在4月份適用於3月30日。
函數onDate必須返回值看起來像那樣 { dateClass: 'CSSclassName', selectable: true, title: ''}