I want to use the 'hide date field' function, when a shop-vacation has ended (which is shown with the from-to date).
So the date field shows for example: Start 21.1.2013 End 23.1.2013. I have selcted the 'to date has expired' setting.
The result is that the date field gets hidden already on the end date (23.1.2013) and not one day later as I would expect and need.
Thanks for your help and the terrific DS.

CommentFileSizeAuthor
#3 date-field-setting.jpg18.23 KBwerner_p

Comments

swentel’s picture

Hmm so in the database, is the end date stored as 23.1.2013 23:59:59 then ? I'm just trying to figure out how I can get behind this because I'm not even sure if that's possible at all. Isn't it possible to set the end date to 24.1.2013 00:00:00 - basically at midnight, or that's maybe a ux problem ?

swentel’s picture

Status: Active » Postponed (maintainer needs more info)
werner_p’s picture

StatusFileSize
new18.23 KB

The format in the database is 2013-01-24 00:00:00 for an end-date 24th of January. As I ticked off the hours and minutes setting in the date field (see attached jpg) this is the resulting database field format. I tried it with hours and minutes on - and it worked correctly. If there is no other way I can live with it - I have to set the end date to 24.1.2013 23:59 manually when entering the date . It would have been easier just to enter full days as closing dates.

swentel’s picture

Status: Postponed (maintainer needs more info) » Active

I'll experiment with it a bit though, it is kind of annoying having to set that date to 23:59 :)

swentel’s picture

Title: Hide date field if from/to has expired is one day off » Make Hide date field work with the 'All day' module
Category: bug » feature

This is tricker than I though it would be. Changing to feature request because the original intent works fine, it's just that date_all_day does some funky stuff in it's calculations.