Generate dates between a date range

Hello,
I’d like to get all the dates between a date range in order to send the list to a repeating group.
I’d like to have a planning with all the days of my date range previously picked up.
Does someone as an idea how to do so ?
Many thanks

I’m trying to do this as well. I’ll let you know if I get it figured out.

You could use the calendar tools plugin and filter your RG for dates greater than or less than certain dates.

I’m using a calendar with date range and can’t get the RG to pick every date within the range. It only gives the first and last date so RG only calculates for two dates.

Hi guys,
Thanks for the answers.
I figured it out using this topic as inspiration : [HOW-TO] Create a custom Calendar using repeating group
Here’s the JS code I wrote :

function getDaysInMonth(mStart,yStart,dStart,mEnd,dEnd) {
var month = mStart-1;
var a=new Date(yStart,month,dStart),D=;
for (;month<mEnd-1;){
for(;a.getMonth()===month;){
D.push(new Date(a)),a.setDate(a.getDate()+1);
}
if (month==11&mEnd!=12) {
a.setYear(yStart+1);
month=0;
a.setMonth(month);
}else{
month++;
a.setMonth(month);
a.setDate(1);
}
}
console.log(a);
for(;a.getDate()<=dEnd;){
D.push(new Date(a)),a.setDate(a.getDate()+1);
}
return D;
}

I hope it will help you as well!

Its already available in bubble plugins,

2 Likes

Yep! You guys got this.

Make a list of dates in the plugin. Filter the dates when you use it as a data source to only contain relevant dates.

Thank you!

Thanks!!

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