Thanks for this very cool module !

In the latest dev version, i noticed that the default value is not set after wednesday.

Screenshot attached

CommentFileSizeAuthor
#5 office_hours_1964274_5_convert_daycolumn.patch12.57 KBjohnv
#3 Default settings before saving (Hours)58.51 KBAnonymous (not verified)
#3 Default settings before saving (settings)100.1 KBAnonymous (not verified)
#3 Default settings when adding a new page48.13 KBAnonymous (not verified)
drupal_office_hours.png13.26 KBjibus

Comments

johnv’s picture

Merci :-)

Can you give me the values you use (screenshot of the widget)
I think your first-day-of-week is Dimanche/Sunday?

jibus’s picture

Hi johnv !

Thanks for your quick reply !

Indeed, the first day of the week set is Sunday.

I set the same value (from the field configuration page) for all fields : 10:00 - 19:00

Anonymous’s picture

I'm experiencing the same thing. I've set Monday to the first day of the week (makes more sense for this client), but the values are saved for Mon & Tuesday, and then whatever was put in Sunday is placed into Wednesday, and whatever was in Wednesday is put into Sunday. I've attached a few screenshots: 1 & 2) Default settings for field before saving. 3) Default hours settings when trying to create a new page with the field.

johnv’s picture

I found the cause. This is because hook_field_load is not invoked on the default values in the Field settings. Thanks for the info!

johnv’s picture

Status: Active » Fixed
StatusFileSize
new12.57 KB

Attached patch is committed here.

!!! Be aware that you need to run update.php upon the next upgrade!!!

johnv’s picture

Added an extra commit: the update function shifted days if first_day_of_week was not sunday.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.