ankurk91 / vue-flatpickr-component

Vue.js component for Flatpickr datetime picker :calendar:
https://ankurk91.github.io/vue-flatpickr-component/
MIT License
968 stars 102 forks source link

How to use rangePlugin in vue3 #247

Closed blackawn closed 2 years ago

blackawn commented 2 years ago

I'm submitting a ... (check one with "x")

[x] Bug report => search github for a similar issue or PR before submitting
[x] Feature request
[ ] Other, please describe

Tell about your platform

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

How to operate on rendered nodes? For example I want to render as <input .../> <span>to<span> <input .../>

Vue template

<flat-pickr
    v-model="date"
    :config="config"
    placeholder="select date"
    class="form-control"
    name="date"
/>

Setup

let config = reactive({
  plugins: [new rangePlugin({}),],
})

Render result

<input type="text" data-input="true" placeholder="select date" class="form-control flatpickr-input" name="date" readonly="readonly">
<input type="text" data-input="true" placeholder="select date" class="form-control flatpickr-input" name="date" readonly="readonly" data-fp-omit="">
ankurk91 commented 2 years ago

https://github.com/ankurk91/vue-flatpickr-component/issues/64