Does order of dates matter in <-range-> function?

Hi, if I have a only when that is:

Current date/time +(days): 14 <-range-> current date/time contains point ‘certain date’

Does it matter that the date in the future comes first? or will it read the function as any date within the range?

I ask because bubble will not let me do current date/time +(days): after the <-range->

If it doesn’t work is there a way around it?

Essentially I am asking if I can use a later date as the start of a range and an early date as the end of a range.

Thanks!

I think it’s a bug where it doesn’t let you add more to the 2nd value

Enabling paranthesis in the settings>Versions tab should let you do it

Thanks tyler! Do you know if range requires the earlier date to be before <-range-> and the later date after?

That I’m not too sure, I usually keep it earlier first then later but see if it throws any errors, maybe it auto flips it around.

@anon31591471, Bubble automatically sorts the start and end of “range” data types. So, in the old world (before parens), the date you want to adjust needs to come first and then you can ← range → with the second value (the value of which cannot be modified).

With parens this is probably not as much an issue.

But anyway, Bubble doesn’t care which order the ← range → parameters come in. When the range is constructed the lesser value becomes the start and the greater value becomes the end.

Of course, if you didn’t want to enable parens (or if they don’t quite support this use case properly) and you needed to make a range out of two dates that both need some adjustment, you can just (prior to the step where you need to construct the range) set two custom states and then make a range out of those states.

1 Like