Forum Academy Marketplace Showcase Pricing Features

Move date forward and backward with click of icon


I have searched the forum and web with no luck in figuring this specific issue out. Attached you will see a screenshot of my date picker and two arrow icons. I am trying to get the date to change forward and backward with a click of the icon by 1 day each. For example, if the user wants to see the data from 3 days ago they would click the arrow 3 times to get to the date, and to look forward 3 days they would click the right arrow 3 days.

Thanks for any help!

creat a custom state (let’s call it “DAYS”) which will be a number. set the date on the title to be "date+(DAYS). set a workflow when you click the right button to set the state to “DAYS”-1, and the left to set it to “DAYS”+1

Hello @ilanmichalby,

Thank you for your reply. I am not sure if I understood your directions properly, as it is still not working. Attached are photos of the state and condition I set up in the time picker input.

time picker condition
set state date

If I understand correctly it looks like you should #1) have your custom state “Type” be a date not a day code (looks like you currently are using the basic code for each day of week…0 for Sun, 1 for Mon etc) 2) when a specific date is chosen in the “date/time picker” that will be the initial value for the custom state from step 1. (3) Then every time an arrow is clicked you must adjust the value of the custom state by adding or subtracting 1 day. → the totality of this should yield a value that changes based on the initial Date/Time picker that can change by 1 day at time depending on if a Left or Right arrow is clicked.

Let me know if this helps.

Currently working with Dates/Times are very tricky in Bubble for things like Appt apps. Some good back ground reading if your needs require above average complexity. It’s possible the below is too advanced for your needs but good to be aware of.

  1. [HOW-TO] Create a custom Calendar using repeating group

  2. Date and Time data structuring - #6 by keith