nathanreyes / v-calendar

An elegant calendar and datepicker plugin for Vue.
https://vcalendar.io
MIT License
4.4k stars 860 forks source link

Pick Month and Year only ( without selecting a date) #90

Open mininoz opened 6 years ago

mininoz commented 6 years ago

In my case, I want users to select month and year only. (the date always be on first of the month.) Is it possible to allow user to select month and then year, without showing date?

Month and Year Picker

Thank you

nathanreyes commented 6 years ago

Just an update here...I'd like to stabilize the plugin before adding any more features, but I do think this will be a good one to add.

divdax commented 6 years ago

+1

For good UX i would start with a scrollable year list instead of clicking left/right and then selecting a month.

ajithsimon commented 5 years ago

@nathanreyes have you done implementing it?

yarynakorduba commented 5 years ago

I just wonder, are there any updates on this question?

jamesalways commented 5 years ago

Do you have this feature available? We need it! Thanks!

gongzemin commented 5 years ago

Sometimes we need only pick year, can this be an option?

danieltugok commented 4 years ago

Are there some news about it? I really need it... Its a good feature. Tks

hlakaccor commented 4 years ago

@nathanreyes have you done implementing it?

innovaweb-dev commented 4 years ago

This option is implementing ? If yes, how to setup this option ? Thx,

ajithsimon commented 4 years ago

@rifton007 you just have to play around with the format and value-format. Below code should work.

Month and Year picker `<el-date-picker v-model="datePicker" format="MMMM-yyyy" value-format="MM-yyyy" type="month" placeholder="Select Month & Year"

`

Year picker `<el-date-picker v-model="datePicker" format="yyyy" value-format="yyyy" type="year" placeholder="Select Year"

`

innovaweb-dev commented 4 years ago

Thx @ajithsimon Can you check, because it doesn't work for me ?

v-calendar 1.0.6

<vc-date-picker
:popover="{ visibility: 'click', placement:'top' }"
:input-props="{
placeholder: 'Date de fin',
class : 'form-control rounded-0'
}"
v-model="draft.endDate"
format="yyyy"
value-format="yyyy"
type="year"
/>
ajithsimon commented 4 years ago

@rifton007 This was working code from my project. I tested and shared it with you.. draft.endDate have only year right?

innovaweb-dev commented 4 years ago

Hi @ajithsimon I tried the two cases : value-format="yyyy" and value-format="MM-yyyy". It isn't working for me, no changing of datepicker.

innovaweb-dev commented 4 years ago

I have version 1.0.8 This option doesn't work for me

<vc-date-picker
    :popover="{ visibility: 'click' }"
    :input-props="{
        class : 'form-control rounded-0'
    }"
    v-model="draft.endDate"
    format="yyyy"
    value-format="yyyy"
    type="year"
/>
AdabanyaChinedu commented 4 years ago

@rifton007 you just have to play around with the format and value-format. Below code should work.

Month and Year picker <el-date-picker v-model="datePicker" format="MMMM-yyyy" value-format="MM-yyyy" type="month" placeholder="Select Month & Year" ></el-date-picker>

Year picker <el-date-picker v-model="datePicker" format="yyyy" value-format="yyyy" type="year" placeholder="Select Year" ></el-date-picker>

This solution is for Element-UI date-picker https://element.eleme.io/#/en-US/component/date-picker. v-calendar component starts with "vc-date-picker" and not "el-date-picker"

I'll like to see this feature available in v-calendar though.

ericcirone commented 3 years ago

I would like to see this as well!

kevnprns commented 3 years ago

This would be a great feature to have on this project. Is there any progress or expected launch of this?

iSWORD commented 3 years ago

Beautiful plugin. I wish this was implemented, I'll have to find another plugin because I don't have time to implement a month/year only picker.

shakhzodkudratov commented 3 years ago

same here. no need to plug in whole element ui just for this feature

shakhzodkudratov commented 3 years ago

we already have it, just need to extract it into separate component


image

shakhzodkudratov commented 3 years ago

so I decided to implement this, feel free to try it https://github.com/shakhzodkudratov/v-calendar

p.s. it's my first contribution

tugskusunoki commented 3 years ago

Any update on this one?

medddddd commented 3 years ago

I would also be very interested in seeing this implemented

cberthiaume commented 3 years ago

Another vote for it here.

nathanreyes commented 3 years ago

What would you prefer to bind to? An object?

<v-date-picker v-model="monthYear" />
export default {
  data() {
    return {
      monthYear: { month: 1, year: 1983 },
    };
  }
}
medddddd commented 3 years ago

Object would be just fine! Can month be null in case of year pick only?

innovaweb-dev commented 3 years ago

Suggestions of features : https://element.eleme.io/#/en-US/component/date-picker#other-measurements

Amocode commented 2 years ago

Hello @nathanreyes Do you have any news about this feature ? You can have a look on this plug-in which has this possibility through a "plugin" (which is a config) monthSelectPlugin https://flatpickr.js.org/plugins/

Chaho12 commented 2 years ago

@nathanreyes Hi, any updates about this feature?

Gyorgyszanto commented 2 years ago

@nathanreyes Hi Nathan. Any news about this?

chemeng commented 2 years ago

bump

daixii83 commented 2 years ago

Any news about this feature?

tranthaihoang commented 1 year ago

I think a lot of people are looking forward to this feature!

tayursky commented 1 year ago

Very need )

kontyente commented 1 year ago

Ho this is a must... please add it

definder commented 1 year ago

I also vote for this feature! 🙋‍♂️ For quick playing around I added the next styles:

.vc-pane-container .vc-weeks {
    display: none;
}
.vc-pane-container .vc-header {
    margin-bottom: 10px;
}

One more click to reach months picker but we don't see the days picker 😁

chanhl22 commented 1 year ago

Hi, any updates about this feature? I want to use this function

andiLeong commented 1 year ago

I need this as well but sadly its not implmented

ojpro commented 11 months ago

are there any updates about this feature?!

ardiankurniawan8 commented 10 months ago

up

akbarism commented 9 months ago

any updates about this feature?

oleksandr-dukhovnyy commented 8 months ago

+

giangcs commented 2 months ago

Hello, any updates about this feature? I want to use this function

sdsoldi commented 2 months ago

:( sad

Not-yourCoder commented 1 month ago

2024 still not in? skill issues