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

Group Events of Week/Day view #632

Closed
AhHa45 opened this issue Jul 9, 2018 · 7 comments · Fixed by #589
Closed

Group Events of Week/Day view #632

AhHa45 opened this issue Jul 9, 2018 · 7 comments · Fixed by #589
Labels

Comments

@AhHa45
Copy link

AhHa45 commented Jul 9, 2018

Describe the bug
Tried to adapt the grouping in month view into the week view:
#281

how to access the group array now im the template?

See: https://stackblitz.com/edit/angular-wfnach?file=demo%2Ftemplate.html

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-wfnach?file=demo%2Ftemplate.html

Screenshots

Versions

  • @angular/core: 6.0.0
  • angular-calendar: 0.24.x
  • Browser name and version: Chrome 67.0.3396.87
@sachin-samel
Copy link

Please see the example below:
https://stackblitz.com/edit/angular-wfnach-4pirbi?file=demo%2Fcomponent.ts

You can click on the event to get the group array.

@AhHa45
Copy link
Author

AhHa45 commented Jul 16, 2018

Sorry @sachin-samel but that doesn't help at all.
I am talking about the week view, not the month view.

@AhHa45
Copy link
Author

AhHa45 commented Aug 6, 2018

nice to come back from holidays and see there is progress, thank you for your work @mattlewis92 will try out the beta now.

@AhHa45
Copy link
Author

AhHa45 commented Aug 13, 2018

@mattlewis92 imho this is still not fixed, how can I access the events from the template?
I can only access one event via the eventTemplate but how can I access the group of events that I define (like here: https://mattlewis92.github.io/angular-calendar/#/group-month-view-events) if I don't have access to the overlying hour element in the template, can you please help?

@mattlewis92
Copy link
Owner

You can assign the value emitted to your components controller and then access the value in your custom template from there

@AhHa45
Copy link
Author

AhHa45 commented Sep 4, 2018

Hi there,

this is not really helpful as the week view will render the events twice in the hour segment resp. event segemtn, as you iterate over every event in the segment week-view-event.component.
If I group the events and access them in the custom template from component, I don't have control over the iteration happening in the week view component.

@mattlewis92
Copy link
Owner

In this case then you could extend the week view component and adjust the template there:

@Component({
  selector: 'custom-week-view',
  template: `
   // copy and adjust from https://github.com/mattlewis92/angular-calendar/blob/master/projects/angular-calendar/src/modules/week/calendar-week-view.component.ts#L81-L278
  `
})
CustomWeekView extends CalendarWeekViewComponent {}

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

Successfully merging a pull request may close this issue.

3 participants