Closed w4matt closed 6 years ago
Sorry, looks like I pasted the wrong link for the Vue version, it should be: https://jsfiddle.net/d9rkqkq0/
@Wherefour I could not reproduce this issue, checkout my jsfiddle - https://jsfiddle.net/ankurk91/zupazg2u/6/
I don't know whats wrong with your example. Same feature is working in my fiddle but not in yours, please compare.
Hmmm, you're right -- yours is working fine.
It looks like the difference between yours and mine is that you are passing the configs in as a property and I've hard-coded mine.
If I pass my config in as a prop, it works fine. Just curious....this is the preferred approach? I have no problem doing it this way if that's what you recommend.
Thanks for taking a look at this (and for this library too)!
Closing this as it's a non-issue. Thanks!
It should work in both ways, I will investigate it more.
Sounds good, thanks for investigating...
Interestingly when we pass config as inline object, watch for the config
prop keep running on each click event, even if we have not made any change in config object.
This causes datepicker to update its configs at the time of values is being cleared.
This issue needs more investigation. A possible solution is to prevent config update if newConfig
and oldConfig
objects are same.
Yeah, that could be a good way to at least make it work. It's not a big deal to pass the config values in as a prop for now though. The only reason I hard-coded it was it seemed like a quick/easy way to just set the defaults right in HTML.
Maybe the ReadMe should mention this so others don't encounter it, until a longer term fix is in place? Thanks for maintaining this library so well.
I'm submitting a ... (check one with "x")
Tell about your platform
Current behavior It looks like maybe the clear button doesn't clear date, in Chrome at least ?
Expected behavior Date should clear
Minimal reproduction of the problem with instructions
Fiddles:
jquery version https://jsfiddle.net/5mce0fnx/
Vue version https://jsfiddle.net/usrpr09y/