Closed josh345ag closed 5 years ago
What browser are you using? Are you using some CSS lib that might be conflicting with the CSS?
Hi, I have the very same problem. Looks like changing
.asd__wrapper{ text-align: center; }
to
.asd__wrapper{ text-align: right; }
fix the issue
Could you share some link where this is reproduced? Most likely, there is some CSS interfering with the component.
I'm sorry, it's my private project on private repo. Also I did not manage to isolate the problem, I only know I've experienced this and after setting change I've posted, it did not show up again.
HI, I've the same problem. When I open the datepicker, everything works as it should be. But when I click previousMonth 2 times, component shows incorrectly. => it happens when the initial DateOne or the empty new Date (to set focusedDate) is on the last asd_month, the hidden one.
Step 1 - shown correctly:
Step 2 - after first click on previousMonth:
Step 3 - after second click on previousMonth: (the whole asd_month with selected DateOne should be the last asd_month (hidden))
After that I also get following Error in the Dev Tools console from Chrome:
It can be reproduced on ur Demo site: first DatePicker http://htmlpreview.github.io/?https://github.com/MikaelEdebro/vue-airbnb-style-datepicker/blob/master/docs/examples.html
I encountered this issue in my app, and it was related to another library adding its own .hidden { display: none; }
CSS.
I took a look at the source, and here's my guess at what's going on:
/src/components/AirbnbStyleDatepicker.vue
on line 57 is using :class="{hidden: monthIndex === 0 || monthIndex > showMonths}"
. It looks like the CSS was updated to BEM though, and this hidden class was missed. I think the datepicker is wanting asd__month--hidden
instead of hidden
, like:
:class="{asd__month--hidden: monthIndex === 0 || monthIndex > showMonths}"
Hopefully this is fixed in v 2.5.0. Thanks @jeryj for pointing out the missed class.
The component is showing incorrectly.