Ticket #2549 (closed feature: wontfix)

Opened 5 years ago

Last modified 7 months ago

[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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 5 years ago by paul

  • Owner changed from paul to iMarc

comment:2 Changed 5 years ago by graste

 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.

comment:3 Changed 5 years ago by anonymous

  • Milestone 1.2.4 deleted

Milestone 1.2.4 deleted

comment:4 Changed 5 years ago by paul

  • Version changed from 1.2.3 to 1.5b4
  • Component changed from ui.core to ui.datepicker

comment:5 Changed 5 years ago by paul

  • Owner changed from iMarc to grabanski
  • Status changed from new to assigned

comment:6 Changed 5 years ago by Cloudream

  • Milestone set to TDB

comment:7 Changed 5 years ago by rdworth

  • Owner changed from grabanski to kbwood

comment:8 Changed 4 years ago by kbwood

  • Status changed from assigned to closed
  • Resolution set to wontfix

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.

comment:9 Changed 7 months ago by scott.gonzalez

  • Milestone TBD deleted

Milestone TBD deleted

Note: See TracTickets for help on using tickets.