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.
I'm using date fields for customers who want to select a delivery date.
I'm trying to disable specific dates from the date picker, so that for example it's not possible to choose our holy Sunday.
Is there a way to configure the date field so that specific dates can be selected en other dates are set to unavailable (disabled)?
Current situation
Disabling a specific day
Desired situation
Any idea if I can make this with the current date module?
All ideas are welcome !!
Comment | File | Size | Author |
---|---|---|---|
28-6-2013 17-21-33_3.png | 30.74 KB | Jawi | |
28-6-2013 17-21-33.png | 21.52 KB | Jawi | |
28-6-2013 17-21-33_2.png | 7.46 KB | Jawi |
Comments
Comment #1
svhooydonck CreditAttribution: svhooydonck commentedHi! Did you find a way?
Comment #2
Jawi CreditAttribution: Jawi commentedDid not find a sollution jet. Al help is very welcome!
Comment #3
sHaDoW_LiGhT CreditAttribution: sHaDoW_LiGhT commentedTry https://drupal.org/project/work_calendar.
Comment #4
Jawi CreditAttribution: Jawi commentedThanks for mentioning the work calendar.
It does the trick for 50%.
Now I have to figure out how to plan the availability for a whole year.
Comment #4.0
Jawi CreditAttribution: Jawi commentedspelling
Comment #5
bmateus CreditAttribution: bmateus commentedI've been searching for something similar, and I've found the Date Restrictions module. https://drupal.org/project/date_restrictions
Maybe it can help.
Comment #6
hockey2112 CreditAttribution: hockey2112 commentedAny update on this? I am looking for the same functionality. I investigated the Date Restrictions module, but have not found a way to exclude specific dates (or to allow front-end users to select a date).
Comment #7
nithinkolekar CreditAttribution: nithinkolekar commentedviews as source and negate..?
just a concept..
If we have some content type having date field which marks it as holidays/scheduled days then we can create a view of that content type which outputs the datefield values (just like entityreference display) and after that we can negate the value to get the selectable dates.
update: corrected small typo
Comment #8
nithinkolekar CreditAttribution: nithinkolekar commentedjust found https://www.drupal.org/project/date_restrictions by jonhattan and he mentioned in its todo list :)
Comment #9
Jawi CreditAttribution: Jawi as a volunteer and commentedThank you Nithin for pointing me in the wright direction. Going to work on my case this week.
Comment #10
kurti CreditAttribution: kurti commentedLatest news? Date restrictions can´t restrict individual dates or individual intervals...
Work calendar only restricts weekdays in whole year.
Is there other module which restricts weekdays and individual dates?
Comment #11
Kir Lazur CreditAttribution: Kir Lazur commentedHi, I had such problem and found simple solution. You can apply it for date_popup.js in makeFocusHandler function. array with dates can be written to Drupal.settings and it's will be available in js code. In PHP , $availability is array of dates with states, for example.
This needs work, but the general direction is clear.
It's a snippet.