小编Nie*_*man的帖子

在 bootstrap datepicker 中启用特定日期

我的网站上有一个 bootstrap datepicker ( https://github.com/uxsolutions/bootstrap-datepicker ),我有一组日期,我想启用和禁用日期选择器中的所有其他日期。我该如何编码?

我怎么能通过这个?

var enableDays = "24-07-2019, 20-08-2019, 22-08-2019, 13-09-2019"
Run Code Online (Sandbox Code Playgroud)
$(function () {
    $('#deliveryDate').datepicker({
        maxViewMode: 2,
        weekStart: 1,
        startDate: '+1d',
        autoclose: true,
        todayHighlight: true,
        format: "dd-mm-yyyy", 
        clearBtn: true,
        language: form.UILanguage(),
        autoclose: true,
    }) 
});
Run Code Online (Sandbox Code Playgroud)

javascript jquery datepicker bootstrap-datepicker

2
推荐指数
1
解决办法
4299
查看次数