Pick a time without picking a date?

@emmanuel Would this be possible? The current time picker has certain limitations that are a bit inconvenient. I’d like to be able to save the time of a recurring weekly event in my data, but I’m forced to assign a specific date to it, which defeats the purpose.

In addition, when you select “This input should not be empty”, it doesn’t force the user to select a time. If they don’t, the time will just default to 12:00 AM.

I thought about just storing individual times as text and just displaying them that way, but I’d like to be able to sort recurring events based on times and only display events that are after the current time.

1 Like

Usually users, use a simple dropdown element for this. Would that work?

Well I can definitely use a dropdown to display and store time options, but the issue arises when I go to sort them. Because times such as 10:00 PM start with the number “1”, they are sorted ahead of times such as 3:00 PM, even though events at 3pm should technically show first.

Another potential use case: I want to show a user events that occur every Tuesday that they can go to, but I don’t want to show them events that have already ended for the day. With times stored as text, there’s no way to hide those unwanted times, so users would have to scroll through a wall of times to find something that fits their criteria.

What if you do the following:

  1. Create a new data type called “Time slot”
  2. The data type will have 2 fields - Slot Number (type number) and Time (type text)
  3. You’ll create the number of these items to match the number of slots in a day - 24 (1 hour slots), 48 (30-min slots), etc.
  4. The field Slot Number will start at 1 (for 12am) and end at the number of slots that you have
  5. You’ll display the text value but sort on the number value. You can then also perform other operations like finding all slots that happen after a certain slot

It’s not super clean but should work…

1 Like

Assuming I’m keeping time in 30 minute increments, wouldn’t I have to set up 48 separate workflows to make sure that the correct text value gets stored with the right time slot?

Could be super tedious.

Nope it doesn’t have to be this complex. Check this out:

https://forum_app.bubbleapps.io/version-test/time_slots?debug_mode=true

Thanks @vlad, that’s an awesome idea!

I’m also going to take a look at potentially filtering a number value against the Current Time by extracting the hour from the Current Time so that users won’t have to manually specify the time slot that they want to see events for.

I’ll report back with the results.

Did you find a viable solution for this? I’m dealing with a similar issue.

Same problem here. As a work around I used a drop down with 10m increments in numbers like hh.mm
eg 8.10 for 8:10 am. Bit ugly but will do for now.

same here. Anyone has a better solution?

^ solution currently seem to be the one. It’s actually better than it sounds compared to way more complicated solutions. At least if you need a simpler way of showing time slots.

I’m thinking of not structuring mine and instead use an input field. That’s possible because I don’t have loads of users fighting for the same slot, and user-to-timeslot doesn’t have to be unique. However, it’s annoying there’s no [time] in the content format selector (preferably with custom option). That’s a suggestion to add.

I haven’t yet looked at if fullcalendar.io or timekit.io would do the trick better.

@natedogg ,where you ever able to find a solution for filtering a number value against the Current Time by extracting the hour Current Time? I have a situation, where I have Doctors who are in Clinic Weekly, between certain times, and would like the dashboard to show, who is currently in clinic. The Date picker isn’t going to work, because they are there weekly, indefinitely not just on a certain date. Hoping you found a workaround.

Hi @JayMoney,

Could you do the following to achieve your goal:

Under Doctor type, have a start clinic field (number) and end clinic filed (number), which would be the hours they start and end clinic.

When current date/time :extract hour > Doctor’s start time and when current date/time :extract hour < Doctor’s end time, then show something or do whatever you need to do to indicate the doctor is currently in clinic.

This way, it has nothing to do with the date. You can also include week day number into this to check what day of the week it is.

Keep in mind that hours are on a 24 hour thing, so 1pm’s hour would be 13, etc.


Gaby | Coaching Bubble

3 Likes

@emmanuel, I am facing this issue too. I hope to have time only option as it is basic fundamental function where many people will be grateful to have it :+1:

This is nearly ready, especially good for mobile.

time

3 Likes

Is this available?

1 Like

Thanks for this @vlad
I have followed your structure but I struggle to save a range of “Slot Number” for each User (field: Available SlotNumber /list of numbers).
I am looking to save all SlotNumber comprised between a FROM dropdown and TO dropdown
ie. If user selects from 12am to 1am, I would like to save the SlotNumbers 1,2,3,4,5 in the DB.
I tried the function range but without success.
Any idea how I should express it ?

What’s the status of this?