pickadate.js如何禁用每个星期天 [英] pickadate.js how to disable every Sunday

查看:93
本文介绍了pickadate.js如何禁用每个星期天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过pickadate.js设置了一个简单的日历。如何禁用日历上的每个星期日?我注意到它有禁用:[] 到位,但不知道如何指定一天

I have a simple calendar set up to via pickadate.js. How can I disable every sunday on the calendar? I noticed it having a disable:[] in place but not sure how to specify a day

$('.datepicker').pickadate({
weekdaysShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
showMonthsShort: true
})


推荐答案

文件说

//Using integers representing days of the week (from 1 to 7):
$('.datepicker').pickadate({
    disable: [
        1, 4, 7
    ]
})

所以如果你想禁用星期日那么:

so if you want to disable sunday then:

 $('.datepicker').pickadate({
     weekdaysShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
     showMonthsShort: true,
     disable: [7]
});

这篇关于pickadate.js如何禁用每个星期天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆