gpt4 book ai didi

jquery - flatpickr maxDate 配置

转载 作者:行者123 更新时间:2023-12-02 03:13:06 27 4
gpt4 key购买 nike

如何在 flatpickr 中设置 maxDate?

<input type="text" id="date-picker" class="form-control" data-toggle="date" placeholder="Select date">

$("#date-picker").flatpickr("minDate", "2019-7-12");

但是它不起作用。

最佳答案

尝试使用options

$("#date-picker").flatpickr({
"minDate": "2019-7-12",
"maxDate": "2019-8-12"
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>

<input type="text" id="date-picker" class="form-control" data-toggle="date" placeholder="Select date">

关于jquery - flatpickr maxDate 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57018658/

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