gpt4 book ai didi

javascript - 在 Materialise Calendar 中设置年份范围

转载 作者:行者123 更新时间:2023-11-30 00:09:06 25 4
gpt4 key购买 nike

如何使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com