[Angular Bug] WjCalendar issues an error when dispose() is called

Posted by: james.ingham on 12 September 2019, 12:26 pm EST

  • Posted 12 September 2019, 12:26 pm EST - Updated 3 October 2022, 10:25 am EST

    Just noticed this error in console from the Angular bundle of the most recent release Wijmo 5.20192.624. I have verified this problem did not exist in the previous release 550.

    Steps to Repeat:

    1. Find the calendar reference
    2. Set its value to null
    3. call dispose() method

    Note: This only seems to be an issue of Angular2. I tried AngularJS which is good.

    Code Sample:

    
    
    import { Component, ViewChild, AfterViewInit } from '@angular/core';
    import { WjCalendar } from 'wijmo/wijmo.angular2.input';
    
    @Component({
        selector: 'prototype-calendar',
        template: `
        <div class="ui container">
    
            <wj-calendar #calendar>
            </wj-calendar>
    
        </div>
        `
    })
    export class PrototypeCalendar implements AfterViewInit {
    
        @ViewChild('calendar') calendar: WjCalendar;
    
        ngAfterViewInit() {
            console.log(this.calendar);
            this.calendar.value = null;
    
            setTimeout(() => {
                this.calendar.dispose();
            }, 5000);
        }
    }
    
    
  • Posted 12 September 2019, 2:42 pm EST

    Hi James,

    We were able to replicate the issue at our end and we have forwarded a bug report with internal tracking id 397780 to the dev team. We will update you on this as soon as we hear from them.

    Regards,

    Ashwin

  • Posted 13 September 2019, 11:27 pm EST

    Thanks a lot. Please test whether other input control elements have this issue as well. From stack trace, it looks like this error is generic, not particularly related to Calendar.

  • Posted 15 September 2019, 2:42 pm EST

    Hi James,

    I have checked the other Input controls, but this issue seems to arise only in the Calendar control. But, thank you for your suggestion.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels