vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Feature Request] [3.3] Month picker in VDatePicker

Open cybergum13 opened this issue 11 months ago • 23 comments

Problem to solve

VDatePicker in Vuetify 2 had a type property that could be set to "month" to show a month selection instead of a calendar date selection. VDatePicker in Vuetify 3 does not seem to have any equivalent option. Is this going to be added back in?

Proposed solution

Add a month selection option back in to VDatePicker.

cybergum13 avatar Aug 02 '23 20:08 cybergum13

hey, can I work on this?

NextThread avatar Aug 15 '23 10:08 NextThread

It is sorely needed here (migration from V2)

Enech avatar Aug 23 '23 09:08 Enech

ok i'll do this

NextThread avatar Aug 26 '23 06:08 NextThread

did anybody tried, I tried to implement this but the array is not working, it's showing all dates as valid

NextThread avatar Aug 26 '23 19:08 NextThread

anyone?

NextThread avatar Aug 28 '23 18:08 NextThread

We have the same need to migrate from V2 to V3. It's still possible to make it as a year Selector using the VDatePicker ?

throrin19 avatar Sep 21 '23 09:09 throrin19

Hello. We have the same need when migrating from V2 to V3 (active-picker) to switch between DATE, YEAR or MONTH). Will this be possible soon? Thank you

carlosvaro avatar Sep 28 '23 13:09 carlosvaro

any update on this ?

kuzeofficial avatar Oct 25 '23 23:10 kuzeofficial

Adding support for this request (migration from v2). Would be nice to not have to cycle through the months using the left/right arrows and instead have the previous option where a user could click "Date/Month" to display all the months within the date picker modal.

russellg avatar Nov 07 '23 06:11 russellg

Hello. We have the same need when migrating from V2 to V3. Will this be possible soon? Thank you

waduocuiduo avatar Nov 15 '23 03:11 waduocuiduo

This has been added already.

Playground

webdevnerdstuff avatar Nov 15 '23 20:11 webdevnerdstuff

This has been added already.

Playground

@webdevnerdstuff I'm sorry. But what you say is not the feature we need. The picker we need is the one which can only select a year and month(YYYYMM) , not the day(YYYYMMDD) . In vuetify 2.x , it controls with the prop type=month. OnlyYearMonthPicker

waduocuiduo avatar Nov 17 '23 02:11 waduocuiduo

@webdevnerdstuff We have the same problem. In 2.x we could define to only display a year picker, a year and month picker or the date picker where you choose year, month and day. In this fix you have to use the viewMode option, but it only makes the default to year or month, but the user have to choose the day before the "@update:modelValue" is triggered. @click:year="setYear" and @click:month="setYearAndMonth" are not triggered when the user choose a concrete year or year/month as before. Maybe I don't now how to use ir, but the viewMode property in the playground is not the solution. Regards.

carlosvaro avatar Nov 20 '23 08:11 carlosvaro

My comment was as an answer to the OP question Add a month selection option back in to VDatePicker. Technically there is a month selector, so I was just pointing that part out. Not as an answer to everybody's inquiry on what they need, that wasn't part of the initial question.

The problem others who have posted here, is a valid ask though. It sounds like you want a straight up "month" or "year" picker, that doesn't require the calendar or selecting a specific date or changing the viewMode after selecting a month/year. I do not disagree with that.

webdevnerdstuff avatar Nov 20 '23 20:11 webdevnerdstuff

@webdevnerdstuff Yes, you are right. I think we are asking for the activePicker property (DATE, MONTH or YEAR) feature you had back in v2. Just a selector of a year or year and month. Will you implement this feature and if so, when? Thanks.

carlosvaro avatar Nov 21 '23 07:11 carlosvaro

@webdevnerdstuff Yes, you are right. I think we are asking for the activePicker property (DATE, MONTH or YEAR) feature you had back in v2. Just a selector of a year or year and month. Will you implement this feature and if so, when? Thanks.

I'm not currently a Vuetify dev. So I do not know if/when they will.

webdevnerdstuff avatar Nov 21 '23 17:11 webdevnerdstuff

No news if the activePicker property (DATE, MONTH or YEAR) feature we had back in vuetify2 will be developed in vuetify3? With the actual version it's impossible to have same behavior (like year-month picker without days).

cvaroregidor avatar Feb 07 '24 11:02 cvaroregidor

activePicker is now called viewMode and is not related to this issue.

KaelWD avatar Feb 07 '24 12:02 KaelWD

Thanks. I know, but with viewMode I don't have the same behavior as with activePicker. I mean, a datePicker where the user selects a year and a month and no day. Setting viewMode to "month", when the user select a year, next step of the datePicker is to show days and not month selection. Any example of how to do this?

cvaroregidor avatar Feb 07 '24 12:02 cvaroregidor

Currently (version 3.5.4) there is only view-mode="months", which directly opens the view of all months, but then you have to select a day, there is no possibility to select only MM-YYYY

desousar avatar Feb 19 '24 15:02 desousar

In version 2.x there was a type="month" parameter

Is it expected to be implemented in version 3.x?

https://v2.vuetifyjs.com/en/components/date-pickers-month/#usage

image

anselmoinfo avatar Feb 20 '24 00:02 anselmoinfo

It looks like this feature has still not been added. Is there a roadmap for this ?

philipbeaucamp avatar May 08 '24 05:05 philipbeaucamp