Fullcalendar Component not working in NG Titanium

Forum to discuss the new web client version of Servoy.

Fullcalendar Component not working in NG Titanium

Postby huber » Thu Oct 19, 2023 11:29 am

As we have many menus using the Fullcalendar component, I'd like to ask about the state of the Fullcalendar Component working in NGTi. Even without any code, it is not even shown (on the form), whereas in NG1 it is shown as well as all my code works as expected (in NG1).

In Servoy Developer 2023.3.3.3845_LTS the latest version in the Servoy Package manger is still version 2.0.1, as it is in Servoy Developer 2022.6.0.3782.

Any news when there will be a new version working in NGTi?

Thanks and regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Fullcalendar Component not working in NG Titanium

Postby paronne » Thu Oct 19, 2023 12:09 pm

Hi Huber,

in TiNG there is a new component for the fullcalendar ( FullCalendar Component 2 ) https://github.com/Servoy/fullcalendarcomponent2 which is to be used instead. You can downloading from the Web Package Manager.
While it offeres the same functionality of the NG1 component, is shipped as a different component because the latest version of the FullCalendar has several breaking changes in it's properties and API ( NG1 is using FullCalendar version 3.x while TiNG using FullCalendar version 6.x ).

Regards,
Paolo
paronne
 
Posts: 203
Joined: Fri Nov 02, 2012 3:21 pm

Re: Fullcalendar Component not working in NG Titanium

Postby huber » Tue Oct 24, 2023 9:01 am

Hi Paolo

Thanks for the reply and the details, very helpful. I got a first menu using the calendar somewhat to work. Up to now, I found the following errors/problems with fullcalendar2, i.e. version 6 of Fullcalendar.

The code

Code: Select all
elements.calendar.addEventSource(eventSource);

gives in Servoy 2022.06 the following error and prevents the display of the calendar at all.

Code: Select all
Exception

!hades.bas.dialog.msg.errorExceptionOccurred java.lang.RuntimeException: Error while executing client side code. Please see browser console for more info. Error: TypeError: null is not an object (evaluating 'callback.formname')!

Without the command, the calendar frame without events is displayed. The very same code line works in Developer 2023.03_LTS.

Then there seems to be a problem with some of the options. The options

Code: Select all
options.allDaySlot = false

gives following warning

Code: Select all
The property allDaySlot is undefined for the type CustomType<svy-
fullcalendar2.FullCalendarOptions>

whereas for example these

Code: Select all
options.eventColor = '#f95';
options.eventTextColor = '#0f0';

do not give a warning but don't work. The result is the same in both above mentioned versions of the Developer.

I am not sure about some other options like

Code: Select all
options.handleWindowResize = true

but the calendar is not resizing in the vertical (y-axis). It does so on the x-asis, but may be the x-axis resizing is not dependent of this option.

Thanks for looking at it.

Best regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Fullcalendar Component not working in NG Titanium

Postby huber » Tue Oct 24, 2023 9:17 am

Hi Paolo

I forget to mention that each event is displayed twice in the calendar, doing just a Browser refresh removes the doubled displayed event. I have seen this behaviour on other menus of our application, but can't remember right now where.

This effect seems to only occur in NG Titanium, not so in NG1.

Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Fullcalendar Component not working in NG Titanium

Postby paronne » Thu Oct 26, 2023 5:42 pm

Hi,

there can be differences in API from the fullcalendar version1 compared to fullcalendar version 2.
About:
elements.calendar.addEventSource(eventSource);

What type of eventSource are you trying to add ? I see API spec is expecting a FunctionEventSource type: example

Code: Select all
   var eventSource = {
      id: 'default',
      events: eventSourceCallback,
      editable: false,
      startEditable: false,
      durationEditable: false,
      allDayDefault: false
   }
function eventSourceCallback(start, end, params) {... }



About eventColor and eventTextColor, how can you see the effects if you have no events displayed due to error of addEventSource ?
About the options allDaySlot, indeed i see it missing. You can request a Feature to add that at support.servoy.com, so will go into our ticketing system. Similar for other issues, you can attach a sample solution demonstrating the issues so our experts can look at it.

Regards,
Paolo
paronne
 
Posts: 203
Joined: Fri Nov 02, 2012 3:21 pm

Re: Fullcalendar Component not working in NG Titanium

Postby huber » Thu Oct 26, 2023 6:32 pm

Hi Paolo

A little hidden in my explanations (text after the second code frame), the following code works in Developer 2023.03_LTS (not so in Developer 2022.06.

Code: Select all
elements.calendar.addEventSource(eventSource);


Because the displaying of events work in Developer 2023.03_LTS, I know about the other options/problems.

The allDaySlot works, but just gives a warning (yellow triangle) on the code line.

Best regards, Robert
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 17 guests

cron