Help with custom calendar

I have a JavaScript code which returns a list of hours in a day. (24 hours). I also have a custom calendar, created using a repeating group. It is displaying the seven days of a week.
In each cell of this RG(Custom calendar) have included @mishav 's ToolBox’s Plugin expression element, which returns a list of hours, starting from 00:00 hours with increments of 1 hour, up to 24 hours. The initial date for this expression, is the current cells date(For the Week RG/custom calendar)

Everything works fine, as you can see from the console

This is the code I’m talking about.

var dateList=;
var d = new Date(2019,2,21);
var day = d.getDay(); // Returns the day of the week (0-6) for the specified date according to local time
var dd = d.getDate(); // Returns the day of the month (1-31) for the specified date according to local time.
var hh = d.getHours(); // Returns the hour (0-23) in the specified date according to local time.
var yy = d.getFullYear();
var mm = d.getMonth();// Returns the month (0-11) in the specified date according to local time.

console.log('Today is: '+ yy + ‘/’ + (mm+1) + ‘/’ + dd);
for (var i=0; i<=23; i++)
{
dateList.push(new Date(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours() + i,d.getMinutes(),d.getSeconds(),d.getMilliseconds()));
}
console.log(dateList);

When I dynamically insert the date elements inside the --var d = new Date(2019,2,21),

I get a list, with initial value of current date and time. As shown for each RG cell.

PROBLEM: I am creating a booking system based on hours in a day. I want the repeating group in each cell to display all the hours of the repeating groups as dates (same as in the console).

Any help will be greatly appreciated. Or if there is a simpler way of doing this, Please share. Thank you.

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