Vue2-datepicker: [Bug] there's no way to replace the default input with a custom one and reproduce its logic

Created on 1 Jul 2020  路  4Comments  路  Source: mengxiong10/vue2-datepicker

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.

Most helpful comment

v3.6.2 fixed it.

All 4 comments

Why do you want to replace the default input ?

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.

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

v3.6.2 fixed it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Raiondesu picture Raiondesu  路  4Comments

kugatsu765 picture kugatsu765  路  3Comments

BuiHuyCuong picture BuiHuyCuong  路  5Comments

kgusihin picture kgusihin  路  5Comments

4spen picture 4spen  路  4Comments