quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.97k stars 3.53k forks source link

QDate Year-Month mode #9419

Open panhezeng opened 3 years ago

panhezeng commented 3 years ago

Hope to support the year-month model, And you can prohibit the selection of the specified month.

Similar to the picture below image

image

https://vuetifyjs.com/en/components/date-pickers-month/#allowed-months

NicoP-S commented 2 years ago

I would love to see this in quasar. At the Moment there is no monthpicker in quasar and something external like vue-month-picker has to be used...

@MilosPaunovic is working on an PR for this #13116

NicoP-S commented 2 years ago

@pdanpdan could you have a look at the PR?

pdanpdan commented 2 years ago

The request and the PR only have the title in common :) You want a QDate without days (in my opinion very easy to do as a custom component because you have no logic for it) and the PR transforms a complex component in a dropdown selector

NicoP-S commented 2 years ago

@pdanpdan what do you mean by creating a custom component? I would like to use the options of qdate has like limit dates.

I tried to force qdate to yearh-month mode: https://codesandbox.io/s/qdate-as-monthpicker-mil0e7?file=/src/pages/Index.vue

@update:model-value="$refs.rDate.setView('Months')" But there is always this transition effect. Is this the right way ?

pdanpdan commented 2 years ago

You have 12 fixed months and a number for year. What do you want to limit on them that is not trivial?

NicoP-S commented 2 years ago

Thought of min/max year month and exclude some monthes. Also all the other nice features like multiple, Ranges and All the Styling props which are available in qdate would be Nice to have.