Is there a bug with how Bubble handles date?

Hi Everyone,

I ran into a little bit of an issue implementing some that should be relatively easy but just don’t work.

I have a datatype with a date field - standard bubble date type.

I have a form that creates the data, with the date field selected from the standard date picker’s value.

Now I want to display this data in a repeating group by “Doing a search for” with date= datepicker value (user select which date they want to see the relevant data) as a constraint to find data that matches that date.

The datepicker has an initial value of current date / time. On page load, it should show data for the current date. I printed the Datepicker’s value and it does show the correct value. Yet no data was shown.

What I have to do is click on the Datepicker, and click out then the data will show. I don’t have to change the date, just have to click on the Datepicker and it’ll trigger “the search”. This doesn’t sound right. It should automatically process the search with the initial value of the Datapicker without the need to click on it.

I tried the following:

  • Directly constraint the search with date = current date / time doesn’t work
  • Created a custom state, set custom state to current data/time on page load then constraint search by custom state. doesn’t work.

The only thing that works is manually clicking on the Datepicker and click out to trigger the “search”.

Anyone else experiencing this issue or know of a fix?

Thanks

Are you doing a workflow action when the date picker’s value is changed:
Screen Shot 2020-05-07 at 9.44.11 AM

Shouldn’t have to because when I click on the datepicker and clickout without needing to select a date, it works. This is because I have an initial value of current date.

The Do search for have constraints (filters) that should dynamically filter based on the date value from the date picker on page load. What I am trying to achieve here is have the list of data shown automatically for today’s data on page load without the user have to select a date.

Ie. if the user click in and select a date it works fine.

can you show some screen shots of the page, including the date picker and the RG data source.

of share link to editor.

Please see screenshots attached. As I mentioned, it works fine if you click on the datepicker (in focus mode). What I need it to do is to work on page load with the initial date.

I’ve experimented by creating another date field and change the date into a number format. That works perfectly. So the error is to do with the date type and somehow it’s not triggering until the datepicker is in focus atleast once after page load.



image

Ah, I see. Sorry, I initially misunderstood.

I think either of these options should work:

Option 1:
Make your page content type = date
Then on page load set the page’s date to current date
Then add a constraint to your search for Date = page’s date
Then make sure to click “ignore empty constraints” in your data source

If you already have your page set to a different content type then you can achieve the same outcome by using a custom state on the page for the current date.

Option 2:
Add a condition to your data source that says if datepicker’s value is empty, change data source.
Then on the changed data source replace the date constraint to date = current date

I’ll try option 1,

already tried option 2. didn’t work.

Thanks for your help. Worse case, I’ll use the workaround by converting the date to numbers.

still it’s weird that something this simple doesn’t work.

ah, 1 more thought… when your date picker’s value changes, you will need to clear the page’s date.

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