These are chat archives for angular-ui/ui-calendar

23rd
Oct 2015
Guilherme R Vasconcelos
@guilherme6191
Oct 23 2015 14:06
Hey Guys, I am having problems on using the (addEvent). Should I create it on html separate and call the addEvent from the controller?
eddiriarte
@eddiriarte
Oct 23 2015 20:58
@guilherme6191 im not sure what exactly(html??) youre trying to add
/* custom add event handler*/
$scope.addEvent = function () {
// an event object, usually retrieved from params.
        var ev = {  
            title: 'Open Sesame',
            start: new Date(y, m, 28),
            end: new Date(y, m, 29),
            className: ['openSesame']
        };
// assuming $scope.events is your event collection
        $scope.events.push(ev);
};