How to disable weekends in jQuery UI Datepicker selection

0 votes
With the help of code can i know How to disable weekends in jQuery UI Datepicker selection?
12 hours ago in Node-js by Nidhi
• 14,200 points
14 views

1 answer to this question.

0 votes

To disable weekends (Saturdays and Sundays) in jQuery UI Datepicker, you can use the beforeShowDay option to specify the selectable dates. Here's the precise solution:

$(function() {

    $("#datepicker").datepicker({

        beforeShowDay: function(date) {

            // day 0 = Sunday, day 6 = Saturday

            return [date.getDay() !== 0 && date.getDay() !== 6, ''];

        }

    });

});

answered 6 hours ago by anonymous

Related Questions In Node-js

0 votes
0 answers

How to customize icons for expand/collapse in jQuery Accordion headers?

Can you tell me How to customize ...READ MORE

13 hours ago in Node-js by Ashutosh
• 25,410 points
9 views
0 votes
0 answers

How to integrate jQuery UI Tabs with AJAX content loading?

Can you explain with the help of ...READ MORE

13 hours ago in Node-js by Ashutosh
• 25,410 points
11 views
0 votes
0 answers

How to create interactive tooltips with links using jQuery UI Tooltip?

Can you tell me how to create ...READ MORE

13 hours ago in Node-js by Ashutosh
• 25,410 points
10 views
0 votes
1 answer

How to position jQuery UI Tooltip relative to a specific element on the page?

To position a jQuery UI Tooltip relative ...READ MORE

answered 6 hours ago in Node-js by anonymous
9 views
0 votes
0 answers

How to create a single-page navigation system using jQuery Mobile?

Can you tell me How to create ...READ MORE

12 hours ago in Node-js by Nidhi
• 14,200 points
11 views
0 votes
0 answers

How to implement a time picker alongside jQuery UI Datepicker?

Can you explian to me How to ...READ MORE

12 hours ago in Node-js by Nidhi
• 14,200 points
12 views
0 votes
1 answer

How to implement swipe gestures for navigation in jQuery Mobile?

To enable swipe gestures for page navigation ...READ MORE

answered 6 hours ago in Node-js by anonymous
15 views
0 votes
1 answer

How to handle form submissions asynchronously in jQuery Mobile applications?

To effectively manage asynchronous form submissions in ...READ MORE

answered 6 hours ago in Java-Script by anonymous
21 views
0 votes
1 answer

How to highlight specific dates with custom styles in jQuery UI Datepicker?

Here's how to highlight specific dates with ...READ MORE

answered 6 hours ago in Node-js by anonymous
14 views
0 votes
1 answer

How to style individual menu items differently in jQuery UI Menu?

To style individual menu items differently in ...READ MORE

answered 6 hours ago in Node-js by anonymous
13 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP