Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    13.0d Regression in DateChooser.updateUI() function

    Hi,
    I think there is a missing parameter in DateChooser.js (13.0d/LGPL/2021-07-13):
    Code:
        updateUI : function (weekNum) {
            // update month/year button titles
            var date = new Date(this.year, this.month, this.day);
    
            if (date.getMonth() > this.month) date = isc.DateUtil.getEndOf(new Date(this.year, this.month, 1), "M", true);
    
            this.updateHeader(weekNum); //<-- missing date parameter
    ...
    comparing to v12.1p.

    As a result if I use a week chooser:
    Code:
    DateChooser.addProperties({showWeekChooser: true});
    then I got
    Code:
    TypeError: Cannot read property 'getFiscalWeek' of undefined
    in
    Code:
        updateHeader : function (weekNum, date) {
            if (!this.showNavigationLayout && this.navigationLayout) {
                this.navigationLayout.hide();
            } else if (this.showNavigationLayout) {
                if (!this.navigationLayout.isVisible()) this.navigationLayout.show();
    
                var members = this.navigationLayout.members;
                if (this.showWeekChooser) {
                    this.updateWeekChooser(weekNum != null ? weekNum :
                        (this.fiscalYearChooserButton ? date.getFiscalWeek(this.getFiscalCalendar()) : //<--ex thrown
                        new Date(date.getTime() + (4*86400000)).getWeek(this.firstDayOfWeek)));
    ...
    MichalG

    #2
    I see this fixed in v13.0d_2021-07-16.
    Thank you.
    MichalG

    Comment

    Working...
    X