Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#4927 closed feature (worksforme)

Date Pick Restrictions

Reported by: TheSmithz Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


It would be great if I could restrict which days are choosable in the date picker.

What I'd like is for the user NOT to be able to select saturdays or sundays ... obviously there's nothing to stop them from typing in the date directly into the form field, but would be great if they weren't choosable from the the datepicker.

Change History (3)

comment:1 Changed 13 years ago by Jörn Zaefferer


We need to rewrite most of Datepicker to make things like this easily implementable on top.

comment:2 Changed 13 years ago by kbwood

Resolution: worksforme
Status: newclosed

This is already available by using the beforeShowDay setting. There's even a built-in callback that disallows Saturdays and Sundays:

$(selector).datepicker({beforeShowDay: $.datepicker.noWeekends});

comment:3 Changed 10 years ago by Scott González

Milestone: 1.next1.8
Note: See TracTickets for help on using tickets.