Exclusive End date - AllDay events

Air Calendar is based on FullCalendar which uses exclusive end dates. Below is an explanation of what this means and how to set things up to work properly.

These threads (#1,#2) has a lot of discussion and useful information on why exclusive dates are used for end dates of All day events.

Yes I know this can be confusing for users. But remember computers understand things differently from humans. For example array indexes stars from 0 but humans count from 1. This means when dealing with arrays the indexes you display to your users will be different from what you use to perform your calculation. Bubble.is as a no-code platform makes life easy for its developer by counting from one but behind the scene counting starts from 0.

So how to I make sure my users don't get confuse?

Store end dates with exclusive times (most apps do this). Whenever you are about to display an all-day end date to the user, always subtract 1 day. Immediately after you accept an all-day end date input from the user, always add 1 before you store it.

You can for example use Bubble's conditional to check if the event is an all day event and if yes subtract 1 day using the bubble function +(days): -1

Example of displaying All Day event end date

When saving an All Day event, do the opposite by adding 1 day to the end date.

Last updated