angular-simple-calendar
angular-simple-calendar copied to clipboard
Multiple events a day instead of just one.
I think it's more realistic instead of just one event a day.
in template
'ng-class="{default: isDefaultDate(date), event: date.event && date.event.length > 0, disabled: date.disabled || !date}"' +
bindEvent = function (date) {
if (!date || !$scope.events) { return; }
date.event=[];
$scope.events.forEach(function(event) {
event.date = new Date(event.date);
if (date.year === event.date.getFullYear() && date.month === event.date.getMonth() && date.day === event.date.getDate()) {
// date.event = event;
date.event.push(event);
}
});
};
@tuananh This directive was designed for simple usage with only one event per specific date. We will appreciate a good pull request though.
Hi,
Remeber change this portion the code in the directive
this
< div class="calendar-title">{{date.event.title}}< /div >
for this one
< div ng-repeat="eventos in date.event track by $index">{{eventos.title}}< /div >
you need put ng-repeat thank's a lot
Was this idea ever submitter as a pull request? I tried adding multiple events per day and it doesn't seem to work.