ui-calendar icon indicating copy to clipboard operation
ui-calendar copied to clipboard

ng-show cannot be used

Open floydqwz opened this issue 12 years ago • 7 comments

Using ng-show="valueWhichWillSoonBeTrue" will not work. The calendar view will not render when the ng-show variable changes.

floydqwz avatar Jul 10 '14 19:07 floydqwz

Does wrapping the calendar in an element with your ng-show works?

viniciuspires avatar Aug 13 '14 12:08 viniciuspires

I'm having a similar problem, only the header with the actions is being rendered. The calendar is just rendered after I change the view or click on the "Today" option... The calendar is inside a tab from the tabset component of AngularUI Bootstrap, which I think is doing the same thing with ng-show/ng-hide...

viniciuspires avatar Aug 13 '14 17:08 viniciuspires

Did you found a workaround ?

romainthiberville avatar Sep 04 '14 18:09 romainthiberville

The solution which worked for me was to use ng-if instead of ng-show.

floydqwz avatar Sep 04 '14 19:09 floydqwz

Only this worked for me:

$timeout(function(){
  _inicializaCalendario(); // Initializes $scope.uiConfig.calendar and $scope.events
  angular.element('.fc-button-today').click();
});

viniciuspires avatar Sep 10 '14 23:09 viniciuspires

It's an "easy" solution, just put your calendar, inside a div with absolute position

flick36 avatar Apr 17 '16 21:04 flick36