Closed ghiscoding closed 4 months ago
@zewa666 FYI, this is a bug in the external vanilla-calendar picker, which at this point I'm still using my fork of it, so I'll look at fixing it in my fork. One I have in mind to fix this issue is to explicitly initialize the calendar picker before calling the vs.update()
. I have also opened a bug on the original repo, we'll see if the author replies and provides a better fix
I'm going to be on vacation a couple of days but will take a look at the PR whichever one it is than.
it's all good, I just wanted to inform you that's all, I'll take care of it all.
and there you go, here's the PR in my fork that fixes the issue
Describe the bug
I was troubleshooting what I thought was a styling issue with the Compound Date Filter which happened after changing the filters dynamically (via Example 10 or 11), the input seem to be wider than the available container. It turns out that it's a much bigger bug in the external lib which is even creating leakage.
Reproduction
After investigating, I found out that the new vanilla-calendar is overriding the input as the new calendar picker and when we then click the same input, it also creates a 2nd date picker. I also found that after clearing the filter and updating filter dynamically, it did not always set the new date into the picker and that is because the set filter value was missing the
cv.update({ year: true, month: true }}
, but then after doing this.update()
, that is when the leakage happens (which overrides the input and creates 2 picker elements after clicking the input)what the animated gif is demoing
query.selectorAll
in the console, shows 2 elements with the CSS class.vanilla-calendar
but there should be only 1 elementWhich Framework are you using?
Vanilla / Plain JS
Environment Info
Validations