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.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..