ghiscoding / Aurelia-Bootstrap-Plugins

Aurelia-Bootstrap-Plugins are Custom Elements to bridge with a set of 3rd party Bootstrap addons
https://ghiscoding.github.io/Aurelia-Bootstrap-Plugins
MIT License
45 stars 23 forks source link

disable date-picker on readonly #41

Closed pnguyen535 closed 6 years ago

pnguyen535 commented 6 years ago

Hello,

Thanks for making a great date-picker. I think this is the best one I have found so far. However, I want to make a request to turn off the date picker if "readonly is set on the input.

Thanks

ghiscoding commented 6 years ago

Pushed a new version 1.1.2 on NPM, you can add readonly.bind="true" and you also need to use the picker option ignoreReadonly: true, see the demo for an example.

Also upvote ⭐️ if you like the lib. Thanks

pnguyen535 commented 6 years ago

Thanks Ghislain for the quick response. However, the behavior is not what I expecting. I was thinking if the datepicker is set to "ReadOnly", it should not show the datepicker calendar to the user. Can you update the code?

ghiscoding commented 6 years ago

It is the behavior you want, just don't enable the picker option ignoreReadonly: false (which is the default anyway). I don't need to change the code.

pnguyen535 commented 6 years ago

Thanks, it works perfectly