Forum Academy Marketplace Showcase Pricing Features

Problem (with video!): Change Calendar End Time based on Start Time

Rookie question here…

I am creating a calendar feature and using the Date/Time Picker.

I want the end date to change based on changes to the start date.

eg. Original meeting is from 12-1pm

Change the start date to 2 pm, the end date moves to 3pm.

It works perfectly using “initial content”.

But once you select the end time…

…and that end time is no longer “initial content”…

…then it doesnt work.

And I cannot find the workflow item that would alter the “end time” input in the same way as “initial content”.

Any ideas?

Here’s a video demo…

OK I figured it out with help from a friend!

You need:

Start time
End Time
Duration (state or database… your call)

Start time is whatever
End time’s only roll is to set the duration of the appointment, and it equals “Start time + duration”

So when the element (in my case the popup) is loaded,

…State: Duration is set to 30 min…

…which sets the end time to start time+duration as initial content.

The magic happens here:

  1. Group “end time” in a group

  2. When end time is changed

…a) set the state of duration
…b) reset the data in “Group End Time”

Once the data is reset in the group, that automatically triggers the “initial content” scripting in Bubble, and so it should work!