NEW PLUGIN: A simple Date and Time Range Generator

I’ve created my first plugin - would love your thoughts!

I needed a quick way to be able to generate a list of date ranges, at specific intervals, which I could then use to power a custom UX for a scheduling feature in my app. There were plenty of plugins that would generate the list of dates/times, but not as a range.

How it works:
The generation of the date ranges happens on page load, or as an input updates - nothing is stored in the database. You can then use Bubble’s powerful operators & comparisons feature to see which of the date ranges overlap with current appointments stored in the database. This means you can change your available/busy schedule on the fly and offer multiple meeting durations and the unavailable date ranges are seamlessly updated.

This plugin is lightweight, doesn’t have any external dependencies and does exactly what it says on the box.

Here’s an example:
For a given day, example March 15, 2023, it will generate three lists of date ranges:

  1. A list of time/date ranges for the specific day, starting at a specified time, at the interval you choose
    e.g. 90 minute intervals, starting at 7pm.
  • 2023-03-15 7:00pm - 2023-03-15 8:29pm
  • 2023-03-15 8:30pm - 2023-03-15 9:59pm
  • 2023-03-15 10:00pm - 2023-03-15 11:29pm
  • 2023-03-15 11:30pm - 2023-03-16 12:59am
  1. A list of date/time ranges by day for the month of that date.
  • 2023-03-01 12:00am - 2023-03-01 11:59pm
  • 2023-03-02 12:00am - 2023-03-02 11:59pm
  • 2023-03-03 12:00am - 2023-03-03 11:59pm
  • 2023-03-04 12:00am - 2023-03-04 11:59pm
  1. A list of date/time ranges by month for the year of that date
  • 2023-01-01 12:00am - 2023-01-31 11:59pm
  • 2023-02-01 12:00am - 2023-02-28 11:59pm
  • 2023-03-01 12:00am - 2023-03-31 11:59pm
  • 2023-04-01 12:00am - 2023-04-30 11:59pm

It will generate the list of date ranges based on either the users current timezone, or a specified timezone.

Would this be helpful in your project? Would love to hear your use cases to see if it could be a fit.

See the demo here:

That’s a pretty hefty price for 90 lines of code and not even a plugin preview, don’t you think? This could be made more useful if you created actions for it as well.

Another thing you should understand is that plugins cannot really be said to run “on page load”. Initialize and update run “as soon as they can” (and update runs whenever field values change). This plugin does not let us know when its values are actually available to us and should trigger an event after it has published its values. Similarly, if you added actions you’d want to trigger events that signal that those actions have completed.


Fuuhhh…that price…

Not raining on your parade but that’s a pretty hefty pricetag for something that can be done with those free plugins and some tinkering of the list generated.

Thanks for the feedback @ihsanzainal84. What would you pay for this plugin?

Can you share the names of the plugins that do something similar?

Well, my Parallels plugin is pretty much a complete implementation of Luxon and sells for $20 once.

1 Like

Wish I knew this existed!

1 Like