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

Disabled dates can still be manually typed into the input #893

Open
ckhatton-transreport opened this issue Jul 11, 2024 · 0 comments
Open

Comments

@ckhatton-transreport
Copy link

ckhatton-transreport commented Jul 11, 2024

I have found you can still select disabled dates if you manually type the date into the input. The only legit way to stop this is to set the prop typeable to false, but I want users to still be able to type a date. I have added conditional logic that sets the date back within the range boundaries of the disabled dates, but the input text does not update to the selected date 🤯 So I am having to manipulate the text using date-fns's format method like this:

this.$refs.<chosenRef>.$children[0].$data.typedDate =
  format(<selectedDate>, this.$refs.endDate.$children[0].$props.format)

// chosenRef: Your chosen "ref" for the `vuejs-datepicker` component.
// selectedDate: The selected date.

😂

I thought I would post the issue in case some else gets stuck, like I did with this issue.

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

1 participant