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] Slot #input doesn't work properly with a custom input component #546

Closed
mrOrlando opened this issue Nov 23, 2020 · 3 comments
Closed

Comments

@mrOrlando
Copy link

Vue2-datepicker version: 3.8.0
Vue version: 2.6.11
Browser: Google Chrome v86.0.4240.198

Steps to reproduce

  1. You need to pass the custom input to the input slot and use the variables from the scope (in my example I use b-form-input component from the bootstrap-vue library);
  2. Try to enter a date manually;
  3. An error will appear in the console.

Reproduction Link or Source Code
https://codesandbox.io/s/hopeful-bogdan-bpzuc

Expected behavior
If a string comes instead of an event in the handleInputInput method, then pass it to the this.userInput parameter.

Actual behavior
An error occurs because the custom component returns the entered value as a string and not an event. You can find this handler in the source code here.

@mengxiong10
Copy link
Owner

You can transfrom the input event.
image

@mrOrlando
Copy link
Author

Thanks for the answer, however, it looks like a workaround, if you want I can create a pull request in this update, it is very simple, but it will help to avoid such problems in the future for other developers?

@mengxiong10
Copy link
Owner

v3.8.1 fixed it.

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

2 participants