Date/Time Picker - I just need a simple date!

I know this has been asked before and I’ve read the previous topics, however I’m struggling to see how there isn’t a straightforward way to do this.

  • I’ve got a Date/Time Picker- user picks date.
  • They select a time from the drop down menu.
  • The end goal is to get these two pieces of data on the calendar.
    *Note- this will always take place in the same time zone.

2024-02-06 09_46_12-Nova _ Bubble Editor

2024-02-06 09_46_37-Novabooths Photo Booths

The problem is that the date picker, no matter what I do, always appends a 12:00 am time to the data. Is there a way to dynamically switch the time selected from the dropdown menu to replace the default 12:00am time from the date picker?

I’m aware this is the way that Bubble calculates days, however it doesn’t seem necessary since I just want it to go straight to the calendar.

‘Format as’ converts the date to text and renders it unusable in the calendar.

Date Time picker offers the ability to select time as well, but it is confusing for the user in my opinion, especially on mobile.

Do I just need to build out my own date picker or is there a solution that I’m missing?

If you don’t include a time-picker, the date picker will default to midnight on the selected date (in the selected time zone).

But you can set the ‘time’ to anything you want when you store the ‘Date’ in your database.

When you say you can set the time when storing the date in the database, can you help me out with the expression that would do that? As it is now I’m sending to the DB separately. Couldn’t figure out how to merge them appropriately.

You can manipulate the date anyway you like.

Assuming you’re using your own dropdown to allow your users to select the time, and assuming that dropdown’s datasource is an option set of times, with either a single decimal attribute for the time, or two separate integers, one for hours and one for minutes, then you can just change the time accordingly.

If (as I’d recommend) your times are stored as decimals (i.e. 10:00am = 10, 10:30am = 10.5, 2:30pm = 14.5 etc.), then just use +Hours when setting the date

If you’re using two separate attributes for hours and minutes then you can either user + hours and +minutes, or ‘change hours to’ and ‘change minutes to’.

2 Likes

That makes sense, thank you

1 Like