Thanks for this very cool module !
In the latest dev version, i noticed that the default value is not set after wednesday.
Screenshot attached
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | office_hours_1964274_5_convert_daycolumn.patch | 12.57 KB | johnv |
| #3 | Default settings before saving (Hours) | 58.51 KB | Anonymous (not verified) |
| #3 | Default settings before saving (settings) | 100.1 KB | Anonymous (not verified) |
| #3 | Default settings when adding a new page | 48.13 KB | Anonymous (not verified) |
| drupal_office_hours.png | 13.26 KB | jibus |
Comments
Comment #1
johnvMerci :-)
Can you give me the values you use (screenshot of the widget)
I think your first-day-of-week is Dimanche/Sunday?
Comment #2
jibus commentedHi 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
Comment #3
Anonymous (not verified) commentedI'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.
Comment #4
johnvI found the cause. This is because hook_field_load is not invoked on the default values in the Field settings. Thanks for the info!
Comment #5
johnvAttached patch is committed here.
!!! Be aware that you need to run update.php upon the next upgrade!!!
Comment #6
johnvAdded an extra commit: the update function shifted days if first_day_of_week was not sunday.