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 am trying to use this for a brewery but their closing hours are not always set, so it would be nice if you could leave the until hours blank.
My idea is that if the till field is blank the field will display something like (Sunday: 11:00 am-Close).
I think that this would be an easy feature to implement and think it would be valuable.
Comment | File | Size | Author |
---|---|---|---|
#3 | office_hours_2189055-3_allow_one_time.patch | 742 bytes | johnv |
Comments
Comment #1
johnvSee both linked issues for D7 and D8. It adds a 'comment' column to each time slot.
Perhaps we can build upon that, and set an addition text.
Comment #2
johnvPushing to D8.
ITMT, both D7 and D8 versions have a 'comment' field on each time slot. That might suffice for some use cases.
Comment #3
johnvThe recent fix brings us a long way to allow only 1 time field. Please try the most recent dev version.
There is only 1 error that prevents us from doing so.
I cannot remove the error without adding an extra checkbox in the field settings.
Comment #4
johnvPlease check #2189055: Allow empty end time (with extra comment)
Comment #5
johnvComment #6
acruma CreditAttribution: acruma as a volunteer commentedJust now how it is working. When end time is empty and save the node this end time will 00:00. But we must print 23:59 becouse, when i re-edit the node we have to go and delete this field or make it empty again >> "$error_text = 'Closing hours are earlier than Opening hours.';"
Comment #7
johnv@acruma,
I gues you have checked the option 'validate hours'. Please uncheck, and you will be fine. Perhaps the check must be refined, indeed, to include 00:00, which is technically earlier, but functionally later.
Comment #8
acruma CreditAttribution: acruma as a volunteer commentedYou were correct, the verification check was active. Still could you tell me some case of functionality where 00:00 is later?
Comment #9
johnvComment #10
johnvClosing this issue, since the current version 8.x-1.3+dev allows for this: