Date Range doesn't let you do + minutes

Am I missing something, or does range not really let you set … a range in a simple way.

So you can’t do range = date date + 1 hour.

It doesn’t appear that you are missing anything…

Check out this response in the linked thread for a creative workaround from a pretty smart chap. :slight_smile:

1 Like

Hey, who is that guy :rofl:

So it hasn’t been fixed since 2017 :roll_eyes:

1 Like

I do these range change calculations prior to saving by using hidden inputs. Not ideal but 1 working workaround for now.

Probably not always possible in all cases.

But what does it mean to increase a range by 1 hour? Does it mean shift the entire range into the future by 1 hour (which implies adding 1 hour to both bounding dates)? Or does it mean increase the length of time represented by the range (which implies adding 1 hour to the end date only)? Both seem to be valid interpretations.

For a booking application, it might make sense to maintain separate custom states for each bounding date (perhaps Time Slot Start and Time Slot End on the parent group in your example). That way, either or both of the bounding dates could easily be updated via the UI. Then, any DB operations (create / modify) would reference those custom states to create the range.

Also, for semantics and readability, I wonder if Booked Slot might be better than Booked Date, as the former implies a range.

(Just some suggestions based on my own struggles with dates. But enough about my personal life… :crazy_face:)

Yeah, I just used a small group to hold it. It is just a date + hours from a Option Set.

1 Like

You can manipulate the start of the range as a date, but not the end. In this case I just have a start date/time and it is 1 hour long.

Understood.

I’m suggesting that’s due to Bubble’s left-to-right approach to evaluating expressions. As soon as an end date is specified, the expression at that point “evaluates to” a date range type - not a date type - and so Bubble presents operations relevant to that type.

I’m not saying it couldn’t or shouldn’t be implemented differently, but it does seem consistent with the way the dynamic expression builder works in general; and so strictly speaking, it’s probably not a bug.

2 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.