mattlewis92 / angular-bootstrap-calendar

A port of the bootstrap calendar widget to AngularJS (no jQuery required!)
https://mattlewis92.github.io/angular-bootstrap-calendar/
MIT License
798 stars 369 forks source link

Drag, Resize, Time range select don't work when the calendar starts as hidden #576

Closed Gonah closed 7 years ago

Gonah commented 7 years ago

Using ng-hide or ng-show, if the calendar or any parent elements start as hidden, then cells of the calendar aren't select-able in any way. Events can still be displayed on the calendar, but they can't be resized or dragged.

Select toggle hidden to display the calendar. Try to use the 'date range select' feature. http://plnkr.co/edit/Ezen7GOaSbMAYWzKNOvr?p=preview

Basically the cells that you would normally see as highlighted on mouse over have a width of 0.

Workaround: Use ng-if instead of ng-hide.

The workaround is fine for me, but this gave me quite a bit of headaches.

mattlewis92 commented 7 years ago

The only solution I can think of to fix this involves horrible hacks to watch the visibility of the calendar and refresh as appropriate, when the user land solution is as simple as using ng-if instead of ng-hide it's cleaner to keep it there. I've added it to the readme to hopefully stop others from experiencing the same issue. Thanks for reporting!