angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

How to show display event information with mouseover (i.e. hovering a day on the calendar)? #459

Open Hiroki111 opened 7 years ago

Hiroki111 commented 7 years ago

On the demo, it can be seen that the event name will be popped up when the day is hovered. So, it should be possible to display the event name with mouseover, but I can't find how to do this from the list of issues. (I thought it could be achieved by adding a property in $scope.uiConfig and make the corresponding function.)

Could anyone give any hint?

Hiroki111 commented 7 years ago

By the way, my uiConfig looks like this now.

$scope.uiConfig = { calendar: { viewRender: function (view) { //some statements here }, renderCalender: $scope.renderCalender, height: 520, editable: true, header: { left: 'month basicWeek basicDay agendaWeek agendaDay', center: 'title', right: 'today prev,next' }, eventClick: $scope.alertOnEventClick, dayClick: $scope.alertDayOnClick, eventDrop: $scope.alertOnDrop, eventResize: $scope.alertOnResize, eventRender: $scope.eventRender } };

kxgio commented 7 years ago

It's tooltip

    $scope.eventRender = function( event, element, view ) { 
        element.attr({
             'tooltip': event.title,
             'tooltip-append-to-body': true});
        $compile(element)($scope);
    };
SriAstitva commented 7 years ago

@kxgio After using your code, I am getting following error.

ReferenceError: $compile is not defined