Enable weekends in jQuery Datepicker
Below given small piece of code fulfill our requirement.
$(function() { $('#txtDate1').datepicker({ beforeShowDay: function(dt) { return [dt.getDay() == 0 || dt.getDay() == 6, ""]; } }); });
When you run this code, you will see the only weekends are enabled. beforeShowDay option, which takes a function to be called for each date, returning true if the date is allowed or false if it is not.
Feel free to contact me for any help related to jQuery. I will gladly help you.