charliekassel / vuejs-datepicker

A simple Vue.js datepicker component. Supports disabling of dates, inline mode, translations
MIT License
2.61k stars 732 forks source link

when the datepicker is disabled, I can delete the value with the clear button #772

Open kubanka-peter opened 5 years ago

kubanka-peter commented 5 years ago

Hi,

when you have the following config: <datepicker placeholder="Select Date" :clearButton="true" :disabled="true" v-model="testDate"></datepicker>

you can clear the date with the "clear button", but I think the clear button should be disabled, too

example: https://codesandbox.io/s/vue-datepicker-demo-iuljq?fontsize=14&module=%2Fcomponents%2FDemo.vue

(the first example, with "Disabled with clear button" name)

dallasbeek commented 4 years ago

FYI I ran into this too. Was able to work around this as I was using a property for allowing edit

                                  :clear-button="editing"
                                  :disabled="!editing"