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] there's no way to replace the default input with a custom one and reproduce its logic #492

Closed
vdkrasny opened this issue Jul 1, 2020 · 4 comments

Comments

@vdkrasny
Copy link

vdkrasny commented Jul 1, 2020

Vue2-datepicker version: 3.6.0
Vue version: 2.6.11

Steps to reproduce
Use the input slot to replace the default input

Reproduction Link or Source Code
https://jsfiddle.net/dyw1puL0/

Expected behavior
I expect the input slot to be a scoped slot that provides all internal methods to use on my custom input.

@mengxiong10
Copy link
Owner

Why do you want to replace the default input ?

@vdkrasny
Copy link
Author

vdkrasny commented Jul 3, 2020

I have a UI kit that I use in an app (it also includes a custom input). Without being able to change the default input, I have to maintain the styles of both components at the same time.

@mengxiong10
Copy link
Owner

mengxiong10 commented Aug 9, 2020

<date-picker>
  <template v-slot:input="slotProps">
    <input  type="text"  v-bind="slotProps.props" v-on="slotProps.events" />
  </template>
</date-picker>

@mengxiong10
Copy link
Owner

v3.6.2 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