New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting errors in Angular when using the mbsc-datepicker as directive instead of the component. #481
Comments
Could you please put together a small example reproducing the issue? I'd like to see how and when are you changing the options. |
I tried making a reproducing example at stackblitz, but the @mobiscroll/angular-lite package are only at the v4.10.6. Do you have a way for me to create an example? |
We don't have publicly available packages for v5. Please open a support ticket at support@mobiscroll.com, and send the project without the |
@dioslaska I made this repository, can it serve as an example for you or when I open a ticket support? |
Thanks, that will do it, I see the errors now. |
Ok, I'll be looking foward for your feedback. |
We fixed this error in 5.0.3. Although I'm not sure why this was happening, it only occurred when used inside your custom component. The error happened from some subcomponents creating and destroying immediately, and on destroy some event listeners were incorrectly cleaned up. I fixed that issue and the error no longer appeared in the test application you sent. |
Thanks for your support. I'll update our application. |
This error:

It is happening every time I change some configuration dinamically (I didn't test all configurations).
For example, I'm using 2 pickers to set the start and end of an event, when I set the start and change dinamically the "min" of the end, I get this error.
I tried making a workaround using the range picker to not have to modify the "min", but then I get the error when changing the "controls" dinamically, from ["calendar", "time"] to ["calendar"] when marking the event as allDay. But normally I get the error when the end has been setted, when using the range.
The error is happening like a loop, so it blocks the platform I'm working on, and it happens only when using the directive.
I'm using this version of angular and mobiscroll:

One observation, when I was using the version 4.10.6, I was only getting a maximum call stack error, when changing the "min" dinamically. Normally the errors occurs when the picker has value, and a configuration has changed, but doesn't matter in what order that was made, and that is true for the v4 and v5.
The text was updated successfully, but these errors were encountered: