Calendar and Change

I’m having some issue with the calendar in md theme.

The thing is that everytime i open the picker the event “change” is emitted.
And becaus i have a listener on that picker to fetch the server when date changes, i get a redundant fetch when i first open and then another one with the real values picked by user.

Why does the md theme requires that picker emit the change event when no date actually changed?

i can see the behaviour is coded here:

  // Set value
    if (!initialized) {
      if (value) { calendar.setValue(value, 0); }
      else if (params.value) {
        calendar.setValue(params.value, 0);
      }
    } else if (value) {
      calendar.setValue(value, 0);
    }

    // Update current month and year
    calendar.updateCurrentMonthYear();

    // Set initial translate
    calendar.monthsTranslate = 0;
    calendar.setMonthsTranslate();

    // Update input value
    if (updateValue) { calendar.updateValue(); }
    else if (app.theme === 'md' && value) { calendar.updateValue(true); }

look at : else if (app.theme === ‘md’ && value) { calendar.updateValue(true); }
why is this?

Pushed fix for this issue

1 Like

so i have to wait for the next release right? . Thanks for the quick reply!

Yeah should be anytime soon