datepicker UI beforeshowday equivalent in keith-wood datepick

datepicker UI beforeshowday equivalent in keith-wood datepick

Hi All,

            I am currently using keith-wood's datepicker for multidate selection. Also i saw many features added in this datepicker. Now i need "datepicker UI beforeshowday equivalent in keith-wood datepick". I googled regarding this. some say that we can use onDate function. but how to use it.? can i please have an example for that..? i need this to enable only specifics dates in array. please help me on this..

Solution:

      I should have worked out this way before. But anyway i got a solution for this as below,

  1. var disabledDays = ["2012-12-4","2012-12-6"];

            /* utility functions */
           
            function isAvailable(date){
                var dateAsString = date.getFullYear().toString() + "-" + (date.getMonth()+1).toString() + "-" + date.getDate();
                console.log(dateAsString);
                var result = $.inArray( dateAsString, disabledDays ) ==-1 ? {selectable:true} : {selectable:false};
                return result;
            }
            /* create datepicker */
            jQuery(document).ready(function() {
              jQuery('#date').datepick({
                onDate: isAvailable
              });
            });