Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can I somehow exclude weekends, using either "date field" or "popup calendar"?
One of the solutions is to add (using CSS) a red background to Sunday and Saturday at popup calendar, but there is no classes such as 'saturday' and 'sunday' in html code of popup calendar.
Comments
Comment #1
karengrey CreditAttribution: karengrey commentedId also like this and also option to exclude public holidays.
Nobarte, as a quick fix you can set a display:none on td.ui-datepicker-week-end-cell
Comment #2
quicksketchNot planning on adding this feature any time soon.
Comment #3
nobarte CreditAttribution: nobarte commentedThanks karengreen! It works for me (#1).
Comment #4
elgandoz CreditAttribution: elgandoz commented#1 = great
thanks!
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedThere won't be further feature development in the X.x-3.x branches.
Comment #6
studiozut CreditAttribution: studiozut commentedIn case anyone is still looking to solve this, in the 4.x version (Drupal 7) I used the following css variant on karengrey's solution above:
td.ui-datepicker-week-end but I had to set visibility:hidden. I found that display:none was causing the classes to be assigned incorrectly thanks to the missing tds (ui-datepicker-week-end was being assigned to Friday and Saturday, not Sunday and Saturday)