如何使用JQuery日历中的表禁用公共假日 [英] How To Disable Public Holiday Using Table From JQuery calendar
本文介绍了如何使用JQuery日历中的表禁用公共假日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何禁用jQuery日历公共假日日期任何人都可以帮助我
使用SQL中的表格不给出默认日期
How To disable From jQuery Calendar Public Holiday date Can anyone Help me
Using table from SQL Not Give default Date
推荐答案
你需要以数组格式保存所有假日日期。
那么你可以使用beforeShowDay
活动:
例如:
You need to hold all holidays date in a array format.
then you can usebeforeShowDay
event :
eg :
var array = ["2015-12-30", "2015-12-26", "2015-12-23"]
( document )。ready( function (){
(document).ready(function () {
(' #txtCalander')。datepicker ({
beforeShowDay: function (date){
var string = jQuery。 datepicker.formatDate(' yy-mm-dd',date);
return [array.indexOf(string)== -1]
}
});
});
('#txtCalander').datepicker({ beforeShowDay: function (date) { var string = jQuery.datepicker.formatDate('yy-mm-dd', date); return [array.indexOf(string) == -1] } }); });
祝你好运
Good luck
这篇关于如何使用JQuery日历中的表禁用公共假日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文