Quasar: QDate emits input only for year and month if the model is not null

Created on 29 Sep 2020  路  5Comments  路  Source: quasarframework/quasar

Describe the bug
If the model of a QDate is null and a year or month is selected without having selected a day, the input event is not emitted.

Codepen/jsFiddle/Codesandbox (required)
https://jsfiddle.net/13ehpqbL/10/

To Reproduce
Steps to reproduce the behavior:
The left QDate with null as model

  1. Select a year -> nothing happens
  2. Select a month -> nothing happens
  3. Select a date -> input is triggered

The right QDate with a value as model

  1. Select a year -> input is triggered
  2. Select a month -> input is triggered
  3. Select a date -> input is triggered

Expected behavior
Input is trigger on year/month/day selection regardless of the current model state like in version 1.12.13

bug

Most helpful comment

Made a reassessment. Compared to behavior from v1.12.13. You're perfectly right, also on the use case (aka "user shouldn't be able to select a day"). Fixed emit-immediately behavior and even removed the deprecation notice (due to the above).

Fix will be available in Quasar v1.14.2.

All 5 comments

@chaosKP It looks like emit-immediately has been deprecated.
image

Instead of relying on the emit-immediately prop (which is indeed deprecated), please use the additional buttons. Adding an Ok and a Cancel would be much better. https://quasar.dev/vue-components/date#Example--With-additional-buttons

Deprecated deosn't mean that it isn't working anymore... only that you shouldn't use it because there is a new/better way. ATM there is no better way (afaik) to recieve a event on month/year change, so this is a clear feature regression from version 1.12..
I can't use buttons because the user shouldn't be able to select a day...

Reopening for later posting a codepen.

Made a reassessment. Compared to behavior from v1.12.13. You're perfectly right, also on the use case (aka "user shouldn't be able to select a day"). Fixed emit-immediately behavior and even removed the deprecation notice (due to the above).

Fix will be available in Quasar v1.14.2.

Was this page helpful?
0 / 5 - 0 ratings