6
Views
2
Comments
Solved
[Horizontal Calendar ] Horizontal calender is in error when there is more that one calendar on your screen.
Question
Forge component by Hugo Fagundes
4
Published on 18 Jun 2019
Application Type
Mobile

I assume this behaviour come from this piece of JavaScript:

maybe the [0].value only takes 1 refDate per screen, am I correct? 

What can we do to change the behaviour so the calendar could be used a number of times on 1 screen?

I added my example to this question. 

CalendarHorizontalDemo.oml

Solution

Hi Ineke,

Ye, this widget was not prepared to be used multiple times in the same screen.

If you are looking for a way to fix it your self by editing the extension, below you can see my changes recommendations to get it to work.

1. Add an input to the Javascript which holds the ID of container Calendar. And change the code for the follow line:

$parameters.Date = document.querySelector('#' + $parameters.CalendarId + ' .refDate') .value;

2. In the first javascript inside the OnReady action, change the lines 28 and 35 to the following:


	28 - var e = t[0].getElementsByClassName("rescalendar_day_cells")[0];
	35 - $(t).find(".rescalendar_day_cells").html(ss), click(t);
	



Hope it could help.

Regards,

Cláudio

Rank: #892

thank you very much Cláudio! it works like a charm!