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

[Bug] disabled date still allows to input dates in the disabled range #508

Closed
AyanamiAkaha opened this issue Aug 5, 2020 · 2 comments
Closed
Labels

Comments

@AyanamiAkaha
Copy link

AyanamiAkaha commented Aug 5, 2020

the bug is similar to #380 (and mentioned there in the comment), but here I am concerned about the logic instead of appearance. If this is intended behavior it would be nice to have an option to prevent selecting disabled date in this way.

Note that disabling manual input is not really a solution, as sometimes it is beneficial to allow manually entering dates, but prevent selecting some dates.

The workaround would be to use :value="myDate" and @change="updateMyDate" instead of `v-model="myDate", and manually implement validation logic, but this seems like something that should be handled by the date picker itself.

Vue2-datepicker version: 3.6.1
Vue version: 2.6.11
Browser: firefox

Steps to reproduce
set disabled date to something (e.g. date => date < Date.now()), then manually enter the date in the disabled range

Reproduction Link or Source Code
can be reproduced on the demo page: https://mengxiong10.github.io/vue2-datepicker/index.html

Expected behavior
After leaving the input field date reverts to what it was before (or any other behavior that will prevent setting date to the disabled one)

Actual behavior
Date is changed to the one specified manually.

@AyanamiAkaha AyanamiAkaha changed the title [Bug] disabled-date still allows to input dates in the disabled range [Bug] disabled date still allows to input dates in the disabled range Aug 5, 2020
@mengxiong10 mengxiong10 added the bug label Aug 7, 2020
@mengxiong10
Copy link
Owner

Thanks for feedback. It should not be changed when the date is in the disabled range.

@mengxiong10
Copy link
Owner

3.6.2 fixed it.

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

No branches or pull requests

2 participants