Ticket #4982 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 7 months ago

Week end config

Reported by: geniusgroup Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

In current datepicker it enforces the css class ui-datepicker-week-end to TWO weekdays (e.g. SAT and SUN)

It is caused by the following code segment

((dow + firstDay + 6) % 7 >= 5

If we can change 5 to other numbers (e.g. 6), then the number of css class ui-datepicker-week-end could also be controlled and specific css formatting (td background color, font size, etc.) will be applied to corresponding column.

Change History

comment:1 Changed 3 years ago by kbwood

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

You can use the beforeShowDay setting to add custom CSS classes to individual dates.

comment:2 Changed 3 years ago by geniusgroup

but how to change the title row by using "beforeShowDay" ?

Example: <tr class="ui-datepicker-title-row"> <td class="ui-datepicker-week-end-cell"><span title="SUN">SUN</span></td> <td><span title="MON">MON</span></td> ... <td class="ui-datepicker-week-end-cell"><span title="SAT">SAT</span></td> </tr>

Since datepicker hardcoded SUN and SAT as weekend, I cannot apply different CSS settings to SUN and SAT title cell

comment:3 Changed 7 months ago by scott.gonzalez

  • Milestone TBD deleted

Milestone TBD deleted

Note: See TracTickets for help on using tickets.