Booking calendar for reservations of assets

Hi Adalo community,

I want to create or add a component that can allow users to select the rental duration of the asset they want from my app. See picture, please help:

You can use a drop down that lists all the Rental Duration options say 1 to 30 days…etc. User can then select & your app will “process” this.

You can use a Date picker (free in Marketplace) to set Rental Start Date. The Rental End can be determined from Rental Start & No of Days.

By the way…the grey text on that “mustard” background is muted. Try black (00000) on mustard.

@eduscvs thank you that constructive and positive feedback. I’m trying different components for the same logic (booking calendar). After submitting the form, however this date picker doesn’t process to the bookings database. How do I make the date picker process the information to the database? Please have a look at this:

I think I understand the set up. When you press Book Now, you need to send the Date Picker 1 & Date Picker 2 data to the dB.

For this to work, your Booking Collection needs to have 2 properties of the Date/Time type, say call it “Start Date” & “End Date”

Then for the Book Now button, you action is to Update the Booking record (I am guessing the Booking record has already been created)

You will see Start Date & End Date in the Update Booking fields list

for Start Date…select “Other Components”, you will see Date Picker 1 & Date PIcker 2.
Select Date Picker 1

for End Date, select “Other Components”, now select Date Picker 2

This should do it.

I have a similar set up, but for Tutoring…e.g Tuition Start Date.

I am sorted thank you, you’re such a star!!! :grinning: :grinning:

1 Like

Only thing I need to do now is calculate the number of days multiply it against the daily rate selected by the user.

Solution is here…for every problem you encounter…there is a high chance that someone else encountered it too!

Once you get the Number of Days, you need another numeric field called Rental. Update Booking record, Rental field with a “New Formula”.

The New Formula option can be found when you select the Magic Text icon in the “Rental” field. You should scroll all the way down…

The math is INT(“Date Picker 2” -“Date PIcker 1”)x"Rental Rate"
The INT rounds down if you have a fraction of a day. The “INT” can be found in “Functions”…all the way to the bottom of the options available for numeric fields

This should do it…

Worked, thank you! @eduscvs