Skip to content Skip to sidebar Skip to footer

Show Only Weekend In Jquery Datepicker Plugin

I would like the user can only select Saturdays and Sundays in my jQuery datepicker. What should I add to my datepicker script?

Solution 1:

$(function()
   {
   $('#txtDate1').datepicker({ beforeShowDay:
     function(dt)
     {
        return [dt.getDay() == 0 || dt.getDay() == 6, ""];
     }
   });
 });

Post a Comment for "Show Only Weekend In Jquery Datepicker Plugin"