Disable Weekends in jQuery DatePicker

In my previous posts,
Implement jQueryUI DatePicker with ASP.NET and
Show Hand/Pointer cursor on image button with jQueryUI datepicker control, I have explained about jQuery DatePicker control. By default this is how it looks.

As you can see, Weekends are enabled (Saturday and Sunday) and you want to achieve what is given in below image.

As you can see the Weekends are disabled in this jQuery UI Datapicker. There is small piece of code which can help you to achieve this.

$(function() {
   $('#txtDate1').datepicker({ 
       beforeShowDay: $.datepicker.noWeekends 
   });
});

That's it.

See live Demo and Code.

Feel free to contact me for any help related to jQuery. I will gladly help you.



Responsive Menu
Add more content here...