Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望用户只能在我的 jQuery 日期选择器中选择周六和周日。我应该在我的 datepicker 脚本中添加什么?
$(function() { $('#txtDate1').datepicker({ beforeShowDay: function(dt) { return [dt.getDay() == 0 || dt.getDay() == 6, ""]; } }); });