Opened 15 years ago

Closed 15 years ago

#2699 closed enhancement (worksforme)

[Patch] ui.datepicker - Higlight custom dates

Reported by: adis Owned by: grabanski
Priority: minor Milestone:
Component: ui.datepicker Version: 1.5b4
Keywords: Datepicker Cc:
Blocked by: Blocking:


When using DatePicker in "inline" mode, it would be nice to be able to highlight/emphasize some dates in addition to today and selected date. Example usage:

$('#datepicker').datepicker({hlDates: ['4 10, 2008', '4 4, 2008']});

I used existing 'datepicker_today' class to make patch shorted, new CSS class should probably be created for this purpose.

Attachments (1)

datepicker_highlight_dates.diff (2.0 KB) - added by adis 15 years ago.

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by adis

comment:1 Changed 15 years ago by paul

Owner: changed from paul to iMarc

comment:2 Changed 15 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:3 Changed 15 years ago by paul

Component: ui.coreui.datepicker

comment:4 Changed 15 years ago by paul

Owner: changed from iMarc to grabanski
Status: newassigned

comment:5 Changed 15 years ago by kbwood

You can set a beforeShowDay function as one of the options when attaching the datepicker. This function gets called for each day shown, passing the date as a parameter, and expects back an array with [0] = true if selectable, or false if not, and [1] = a CSS class to add to the day's cell. Use this to apply your custom CSS to highlight/emphasize individual dates.

comment:6 Changed 15 years ago by kbwood

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.