I need hep with this problem i am facing. I need to set a minimum Date & time on the Date/Time Picker. Right now the plug in only accepts date or time separately. What i am trying to do is set a minimum date of today +8 hours, so for example if the date / time is 27/09/2016 00:00 then the available dates and times must be greater than 27/09/2016 08:00
The problem I am facing is similar. The problem with the date picker is that it treats days and hours seperatly.
So if the minimum date is today and the minimum hour is 7 pm the subsequent days are also limited to 7 pm. What I want is to limit the todayās date to 7 pm only. Future dates and time not to be effected.
Yeah, havenāt managed to solve that yet. I skipped it and āopenedā the date picker instead. Not the optimal way in my mind, but better than half working solution.
Iām very interested to hear about @NigelG situation.
For what I understand, you can just use decimal numbers to get the minutes (e.g. 0.5 for 00:30). If you extract that from a date format, juste make sure that you first extract minutes divided by 60 and then extract hours rather than the other way round (otherwise it will divide both hours and minutes per 60 and probably not give the decimal number you expect).
However, thereās still the issue that the conditional is based on End Dateās value⦠which is until AFTER both the end date and time have been selected. In other words, it wonāt work if the user clicks on an empty date/time picker for the End field.
This is a problem because the most typical flow is as follows:
User sees BLANK Date/Time inputs for Start & End Date
User enters Start Date & Time. Now itās set.
User selects End Date⦠and moves to the Time componentā¦
The user should see only the possible hours on the selected day⦠(min hour = start date/timeās value, if itās the same day as Start).
But the user sees all hours, because the End date/time inputās value is still (empty) - so the conditional fails.
The only way I see around this is to set the workflow for the End Date to be auto-populated with the start date. However, I donāt like this, because it removes the flow⦠it takes away the indication that the user has 1 remaining step to fill out the end date/time by seeing the empty field.
Also, I canāt just user āinitial contentā = start date, because it gives the illusion that the End Date is set when itās not actually in the database. (My users are pulling up records, not submitting a form when they see these fieldsā¦). Plus, Iād like to leave the possibility for them to choose if they intentionally want to keep the End Date/Time blank (for display, filtering, record keeping, etc.)
I just wish the date/time picker would expose the selected date value of the input even when the time has not been selected. Like ātyped textā on searchboxes⦠Then this would all work. It would also help allow for all sorts of conditionals for min hour, based on the selected-but-not-submitted date component.
I think they didnāt want to, because thereās no ādateā data in bubble. A date field is inherently a date&time, so it would correspond to midnight on that day.. and I guess they think people wouldnāt know how to work with this (or get all glitched out when dealing with time zones)
Ok⦠I actually solved my remaining issue. Add a click workflow to handle setting the blank input to the start dateās value. Then it has a value to work with. (And luckily bubbleās engine is quick enough that the calendar/dropdowns update fast enough)
If anyone intends to mirror this behavior but doesnāt have the data stored in the DB, Iām sure you can swap out my stored Start Date/Time value with the input elementās value (Start date/time picker) ā¦for both the āonly whenā condition and the āmake changes toā value.
Or⦠if you arenāt intending to make changes to data yet, but you still want the functionality of grabbing the correct min dates upon clicking a blank date/time pickerā¦
ā¦you can group the End Date/Time input in a group of type=date, (Source=blank) and set the End Date/Time pickerās Initial Value to Parent group's date. Then, for the click workflow, you can replace my āmake changes toā action with a ādisplay dataā action that sends the Start Date to that End Date group.
I actually think Iāll switch to that method so I donāt get a loading indicator.
Hopefully this helps someone⦠I feel like anyone this far into frustration with the half-baked Bubble date/time picker has resorted to plugins long ago. lol.