How to filter the date range?

Hello bubble Devs,

Screenshot_27
This is my database values.


This is my events listing page i filter the events start date and end date between current date/time and greater than current date/time list this events in active events. and samaller than current date/time list this in past events how to add this constrain?

Screenshot_29
this constrain is not working proper.
can you please help me!!!

Hi there, @hardikrathavi123… date ranges can be tricky to work with, so if I was doing what you described, I would likely have separate fields for an event’s start date and end date. With separate fields in place, you could get active events with a constraint where start date >= Current date/time, and you could get past events with a constraint where end date < Current date/time.

Hope this helps.

Best…
Mike

3 Likes

Yeap … change the rangeDate field to a date as @mikeloc suggests

Using two dates (start and end) should do the trick as filtering for dateRanges is not only tricky but somewhat difficult to achieve in Bubble

2 Likes

Thanks @mikeloc ,

Thank you for your valuable insights! Managing date ranges can indeed be challenging, and your suggestion to use separate fields for start and end dates makes a lot of sense. Your explanation on retrieving active and past events with constraints based on the date range is clear and helpful.

I appreciate your expertise and the time you took to guide me through this.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.