Ticket #4927 (closed feature: worksforme)

Opened 10 months ago

Last modified 9 months ago

Date Pick Restrictions

Reported by: TheSmithz Owned by:
Priority: minor Milestone: 1.next
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:

Description

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

Changed 10 months ago by joern.zaefferer

  • milestone changed from TBD to 1.next

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

Changed 9 months ago by kbwood

  • status changed from new to closed
  • resolution set to worksforme

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});

Note: See TracTickets for help on using tickets.