Opened 14 years ago

Closed 14 years ago

#4530 closed feature (wontfix)

disabled & special days

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


found this functionality at which allows for disabled & special days the way it is implemented there is kind of ideal, on init you pass:

onRender: function(date) {

return {

disabled: dateDisabled(date), className: dateClassName(date)



date is Date object, dateDisabled() returns true or false and dateClassName returns a string containing the class that should be added or null for none

the only problem i've run into with this one is that you can select a range which contains disabled dates if you pick a start date before the disabled dates and an end date after them

Change History (3)

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

Milestone: TBD1.8

comment:2 Changed 14 years ago by Jörn Zaefferer

Component: ui.coreui.datepicker

comment:3 Changed 14 years ago by kbwood

Resolution: wontfix
Status: newclosed

You can already achieve this through the beforeShowDay setting. This is set to a function that is called for each date shown. It receives the date and returns an array where [0] is true if the date is selectable, false if not, [1] is one or more CSS classes to apply, [2] is an optional popup tooltip. See the noWeekends function in the plugin for an example.

Note: See TracTickets for help on using tickets.