Click here to Skip to main content
15,917,971 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How To disable From jQuery Calendar Public Holiday date Can anyone Help me
Using table from SQL Not Give default Date
Posted

1 solution

You need to hold all holidays date in a array format.

then you can use beforeShowDay event :

eg :

JavaScript
var array = ["2015-12-30", "2015-12-26", "2015-12-23"]


        $(document).ready(function () {
            $('#txtCalander').datepicker({
                beforeShowDay: function (date) {
                    var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
                    return [array.indexOf(string) == -1]
                }
            });
        });


Good luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900