kleinrein / vue-month-picker Goto Github PK
View Code? Open in Web Editor NEWA dead simple and elegant month picker for Vue
Home Page: https://kleinrein.github.io/vue-month-picker/
License: MIT License
A dead simple and elegant month picker for Vue
Home Page: https://kleinrein.github.io/vue-month-picker/
License: MIT License
Running 'yarn add vue-month-picker' returns an error "Invalid hosted git fragment "github:kleinrein:vue-month-picker"
when the year is change either by buttons or editing, the date shown in the input should change to reflect the new year, even though the months are still the same.
with default month year and max-date min-date when you select a month, I take the next one.
<month-picker
lang="es"
:max-date="maxDate"
:min-date="minDate"
default-month="11"
default-year="2020"
@input="changeStartDate"
/>
Is there a types file available for typescript projects?
Have you considered adding the ability to set a minimum and/or maximum date? I didn't see any other related issues or requests for this but would really like to be able to disable dates outside of a given range.
I tried adding the icon with css but it cannot open the month picker when clicking on the icon, can you help me?
Why you don't have events on month-picker-input?
We have used MonthPickerInput. Default month and year values are not displayed by default even we used default month and default year property for default selection.
Is possible to display month and year values by default.
I've added this as my element in my application:
<MonthPicker
@change="showDate"
date-format="%n %Y"
:show-current="true"
:show-year="true"
:default-month="month"
:default-year="year"
:min-date="getDate()"
>
</MonthPicker>
Note: if the year is hard coded to a number it doesn't break however if using a variable of any kind this is the result
Hello @kleinrein,
Thanks for this plugin.
I have an issue with props defaultYear
. The first emit @change not return the year i have set, but the default current year.
How how i use the plugin
<month-picker :default-month="10" :default-year="2022" @change="onChangeMonthPicker"></month-picker>
I browsed the plugin code source and found on mounted
lifecycle:
mounted() {
if (this.defaultMonth) {
this.selectMonth(this.defaultMonth - 1)
} else if (!this.noDefault) {
this.selectMonth(0)
}
if (this.defaultYear) {
this.year = this.defaultYear
}
}
The method this.selectMonth()
is called and emit first @change before
this.year = this.defaultYear
has been executed.
Please, take a look of this issue.
I'm not using bundlers, but I'd still like to use this module.
Maybe via unkpg, jsdelivr or just a pre-compiled download link?
Is that possible?
I can see a dist folder in jsdelivr, but not really sure if I can use it..
https://cdn.jsdelivr.net/npm/[email protected]/dist/
Hi friends. I have got a question. I want to select only current month and previous months. How can I disable the months after the current month using month picker? My question is urgent. I would be grateful if you reply.
When vue-month-picker
is used in a form, clicking on any of its <button>
elements causes the form to be submitted.
See https://stackoverflow.com/questions/41904199/whats-the-point-of-button-type-button.
Hi,
Can we disable the month option, and allow only year selection?
For instance, in case we only have to get year (not month/day/time).
Suppose the user decided to cancel the edit. How can I clear the input and set it to null again?
for month May, it should be "Mei", not "Mungkin"
i have used in with modal but month picker not closing always remaining open .. and if i use it in form when pressing next year button form getting submited .
When using the buttons to change the year, the year of the selection changes. (debatable, see P.S.)
This happens even if we are switching into a year that is outside [minDate, maxDate]
Here is the example in my application
And here is a similar reproduction in the demo of this repo
P.S.
As stated by @wshgziva in a comment to another issue , perhaps we don't want to change the chosen date as soon as the year changes (displayYear
!= chosenYear
)
Hello,
I need to disable past month and year in picker. So, user can only select month and year of current and future
Is there any possible way to do this?
Thanks
Is this library support to select month range?
I try pass placeholder proprty to component, but it appear as attribute of month-picker-input-container
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.