Skip to main content

Search and Top Navigation

#2549 closed feature (wontfix)

Opened March 19, 2008 12:42AM UTC

Closed April 07, 2009 06:53AM UTC

Last modified October 11, 2012 09:15PM UTC

[ui.DatePicker] Multiple periods with an attached classname

Reported by: graste Owned by: kbwood
Priority: major Milestone:
Component: ui.datepicker Version: 1.5b4
Keywords: datepicker multiple valid date ranges Cc:
Blocked by: Blocking:
Description

For displaying multiple valid periods of time in the calendar it would be cool, if it's possible to define multiple "minDate" and "maxDate" options. Something like a multi-dimensional array with min-/maxDates could be used, I suppose. Another useful feature for this would be to add a CSS classname to each array element. With that you could highlight specific periods or just color them differently (think in terms of booking systems etc.)

With the above additions a calendar could contain multiple valid periods to either select from or display, while having different colors for each period.

Attachments (0)
Change History (9)

Changed March 19, 2008 01:14PM UTC by paul comment:1

owner: pauliMarc

Changed March 25, 2008 12:04AM UTC by graste comment:2

http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker-widgit-update

The above date picker lets you add invalid dates in a YYYYMMDD-format with *-wildcards like:

// Disable specific dates 
datePickerCtrl.datePickers["elemid"].setDisabledDates(["20061225", "****1231", "******01"]);

Using such a format could be used to disable specific dates for selection in a very brief form.

Changed May 24, 2008 03:39AM UTC by comment:3

milestone: 1.2.4

Milestone 1.2.4 deleted

Changed May 24, 2008 07:14PM UTC by paul comment:4

component: ui.coreui.datepicker
version: 1.2.31.5b4

Changed May 27, 2008 10:38PM UTC by paul comment:5

owner: iMarcgrabanski
status: newassigned

Changed August 16, 2008 04:37PM UTC by Cloudream comment:6

milestone: → TDB

Changed November 19, 2008 03:15AM UTC by rdworth comment:7

owner: grabanskikbwood

Changed April 07, 2009 06:53AM UTC by kbwood comment:8

resolution: → wontfix
status: assignedclosed

You can use the beforeShowDay setting. This is a function that is called for each day shown. It receives the date as a parameter and returns an array with [0] set to true if this date is selectable or false if not, [1] set to one or more CSS classes for this date, [2] (optional) set to a popup tooltip for this date. See the noWeekends function for an example.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:9

milestone: TBD

Milestone TBD deleted