Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple events a day instead of just one. #1

Open
tuananh opened this issue Jan 14, 2015 · 3 comments
Open

Multiple events a day instead of just one. #1

tuananh opened this issue Jan 14, 2015 · 3 comments

Comments

@tuananh
Copy link

tuananh commented Jan 14, 2015

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);
    }
  });
};
@ilyagelman
Copy link
Contributor

@tuananh This directive was designed for simple usage with only one event per specific date. We will appreciate a good pull request though.

@armandoruizgonzalez
Copy link

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

@mikemil
Copy link

mikemil commented Aug 27, 2016

Was this idea ever submitter as a pull request? I tried adding multiple events per day and it doesn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants