Closed Pablo-Aldana closed 6 years ago
hey there @Pablo-Aldana , thanks for the report. are you using the polymer 2.x starter-kit project?
is there any way you might be able to provide some example code that reproduces the issue you are having?
great that you found a work-around. one thing to watch out for is making sure that line only queries '.selected' in the scope of a single datepicker, does your fix work when there's multiple datepickers shown on the same page?
I've reproduced the issue, confirmed the solution put forward by @Pablo-Aldana , & submitted it as PR #4 . Thank you for this awesome component & for the fix!
@ZachMoreno thanks for the feedback. can you share code that reproduces this issue?
Hello! Congrats for the component it looks great. I've found an issue while using the calendar in polymer starterkit. When you start to tap dates they are not un selected (even if the option multidate is false).
Reviewing the code I've seen the issue is related the shadow DOM created in the starterkit.
In the class sched-month-view.html -> function _dayTap. There is two lines to remove the selected days
_toClear = this.querySelectorAll(':scope .selected');
This query selector is returning an empty array everytime. you can test it by printing the object in the console.
I've solved the issue by using the Polymer DOM function
_toClear = Polymer.dom(this.root).querySelectorAll('.selected');
This returns the current selected objects to be removed. And gets the issue solved :)
I do hope this can help you to improved your components or to others to solved the issue in their own code.
Regards