[New Feature] Date and Number Range support

Thank you Nigel

1 Like

Guys, i just want to say first and foremost thanks for the help earlier and a special thanks to @NigelG, however Ive encountered a slight problem when i try to “remove” date ranges through “make changes to a thing” in DB, I’ve tried removing “date” instead of “date ranges” previously and it worked just fine but this wont seem to work with the “remove” feature. I’d really appreciate any input you guys might have.

Yup, looks like a bug to me as well. That isn’t working.

1 Like

I’m trying to select items within a range, but I don’t see “contained by” as in the example.

Any ideas? I really need this function.

Why not just using two constraints, < and >

1 Like

That is close, but I need ≤ and ≥ to select the items on that day as well.

If I select Say Oct 2nd - 5th I only see items from 2nd - 4th.

You could add 1 day to the second date behind the scenes.

1 Like

That’s what I ended up doing.

1 Like

Hi - curious, is there a solution for doing this if the dates being returned are from an API? For instance, I have an API response with “Date Start” and “Date End” fields for each record that comes back.

I want my results to only display results from the API that are contained within a particular “Date start” and “Date end” range - but it doesn’t look like Bubble is recognizing/allowing me to use the <–range–> capability for the date fields coming back from the API response.

Am I missing anything?

Looks like the simplest thing, but I cannot get “contains” to work. Have made a type and set a Date field as above (type date range), and want an event to happen When that range contains current date (or any input date, for that matter). Would appreciate it if someone can point to a piece of code where this works. In the meantime, I have set two conditions with an AND for start and end, but it would be way simpler to have the “contains” feature working. Thank you!

Can you share an app showing what you’ve tried? It’s always easier to get help that way.

Hi Emanuel, what would you do if you were to input multiple non-consecutive dates ? I am building an app where users would have to input dates on which they are available. So sometimes it can be consecutive, but sometimes not. Is there a way to implement that input ?

Soooo helpful! Game changer! Congratulations on the great job!! This just keeps gettin better!! Keep it up

I have two questions on this feature and they apply to both the present (and future, if someone on the bubble team decides to comment.).

  1. Is there any way to manually enter/modify a date range field on a type from within the App Data section, or can this field only be set by a workflow?

  2. Can the date range field be defined as a “calculated field” on the Data Types backend without a workflow? For example, if I have Start Date and End Date fields and I want a Reservation Length field, I would just input an expression to the effect of End Date - Start Date to arrive at my Reservation Length value. Does bubble support this kind of time intelligence expression language on the database side or is my only option to perform this work in a workflow?

There’s an OPERATOR for constructing a range. When building a date expression, you will see “:<- range ->”

So you can construct a date range object as:

datex <- range -> datey… and then do stuff with it like “contains point datez”.

As far as the App Data interface, I’m not sure how date ranges look (it would not surprise me either way to see that you can set one there or NOT).

However, it would be pretty easy to build a lil repeating group on an admin page for building/modifying such entries. (Again, the entry fields would be one date and another date. You’d need to have a button or WF action like “when either of those date inputs is changed” that constructs the date range and updates the field. [I think. I don’t think there’s a built-in single input type that can represent a date range object, so you can’t just autobind in this case.]…

1 Like

Hi everyone,

I’ve been trying to figure out the date and time picker to see available and non available times. I want to be able to show the date/time start and end for a repeating group. Is someone willing to do a video conference to help me figure it out? Thanks

Any chance there was an update on this functionality?

Do you have a specific question about this functionality?

Slowly making my way through it. I’m struggling with accessing the overlap function. I thought maybe there was a better way since the comments in 2016.

1 Like