Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

its cleared on blur if using properties "typeable" and "langague" together #733

Open
hcivelek opened this issue Jun 21, 2019 · 7 comments
Open

Comments

@hcivelek
Copy link

When I using "typeable" and "language" properties together, picker cleared on blur.

@frgla
Copy link

frgla commented Aug 7, 2019

Having same problem, any solutions?

@LukasOchmann
Copy link

LukasOchmann commented Aug 13, 2019

if i use a date formatted like YYYY-MM-DD. Its not cleared on blur.
this is my setup for the Datepicker:
required :language="de" format="dd.MM.yyyy" :disabled-dates="datepickerState.disabled" :value="dates.to" v-model="date.to" typeable

@JoDaBaRo
Copy link

Having the same issue, it seems it only happens with certain dates. In my case any January, April, August or December date gets cleared on blur while the rest works as intended.

All the broken months besides January are multiples of 4 so maybe it has something to do with an internal calculation?

@bvandier
Copy link

Same problem here.
I read the code for the blur event. It uses Date.parse() to determine if the inputted value is valid.
This works well for dates formatted like MM/DD/YYYY of YYYY-MM-DD, but not for DD/MM/YYYY.

I don't see a workaround, my only option is to set :typeable="false".

@ConorSheehan1
Copy link

pr #653 could solve this! It delegates the parsing of dates, so you can pass a parser function, the same way you can pass a formatter function

@otaviogaiao
Copy link

Having the same exact problem.

@astalpaert
Copy link

Having the exact same problem when using :language="nl" and :typeable="true" and format="D dd MMM yyyy" together. When removing typeable or language, it's working. I also managed to 'fix' this by changing my format to: format="MM/dd/yyyy".

Not working:
<datepicker :language="nl" :typeable="true" format="D dd MMM yyyy" id="until" v-model="filter.until"/>

Working:
<datepicker :language="nl" :typeable="true" format="MM/dd/yyyy" id="until" v-model="filter.until"/> </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants