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.

CommentFileSizeAuthor
#3 office_hours_2189055-3_allow_one_time.patch742 bytesjohnv
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnv’s picture

See 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.

johnv’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Pushing to D8.
ITMT, both D7 and D8 versions have a 'comment' field on each time slot. That might suffice for some use cases.

johnv’s picture

Title: Display text "Close" if end field is empty » Allow empty end time (with extra comment)
Status: Active » Needs work
Related issues: +#2860041: Cannot add comment when day is closed.
FileSize
742 bytes

The 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.

Both Opening hours and Closing hours must be set.

I cannot remove the error without adding an extra checkbox in the field settings.

johnv’s picture

johnv’s picture

Component: Code » Code - widget
acruma’s picture

Just 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.';"

johnv’s picture

@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.

acruma’s picture

You were correct, the verification check was active. Still could you tell me some case of functionality where 00:00 is later?

johnv’s picture

johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.3
Status: Needs work » Closed (works as designed)

Closing this issue, since the current version 8.x-1.3+dev allows for this:

Thursday: 18:00- until closing time