search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Click on events not working when scheduler loaded in a dynamic component

Asked by Julien
5 years ago.

We use a scheduler in a Ionic 3 - Angular 4 application and we face a problem: the scheduler is loaded in a dynamic component and when we try to click on events it doesn't work.

The funny thing is that if you click on any available cell of the scheduler, the click starts working on events.

I have a repo that you can clone to test it: Once cloned you can run yarn and ionic serve to run the app.

Could you check it and tell me if I am doing something wrong or eventually if it is a bug.

Comment posted by Julien
5 years ago.

Hey Dan, did you get chance to check more that problem?

I have been checking your example using just angular 4 (without Ionic) and it works fine, you can click right away on the event.

I have been updating my github repo to use last version of ionic, daypilot and I saw that it is not really related to dynamic components because the initial example in a basic Ionic page is not working.

So I'm thinking that it could be related to Ionic.

Comment posted by Julien
5 years ago.

On our prod server we also log any error that occurs and we have a recurrent error coming from the scheduler. I don't know how it happens. I can't reproduce how our users generate it but this is related to that piece of code:

n.gKeyUp = function(e) {
var e = e || window.event;
17 === e.keyCode && n.rangeCalendar && n.rangeCalendar.ul.dispatch()

and we have the following error: Cannot read property 'dispatch' of null.

Since the code is minified it is really hard to determine if we configure incorrectly something, maybe you'll have an idea.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.