如何使用 Materialise 日历设置年份?我的目标是从 1990 年到当年。
这是我正在使用的代码
function bindDatePicker(){
$('.datepicker').pickadate({
selectMonths: true,
selectYears: 50,
format: 'yyyy-mm-dd'
});
}
它显示的范围是1991到2041。如何将它设置为1990到2016(curyear)。
最佳答案
function bindDatePicker(){
$('.datepicker').pickadate({
selectMonths: true,
selectYears: 50,
format: 'yyyy-mm-dd',
min: new Date(1990,1,1),
max: true // `true` sets it to today. `false` removes any limits.
});
}
关于javascript - 在 Materialise Calendar 中设置年份范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37247681/