mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.72k stars 866 forks source link

Overlapped events display #1010

Closed jonathansolorzn closed 5 years ago

jonathansolorzn commented 5 years ago

Is your feature request related to a problem? Please describe

No

Describe the solution you'd like

When having more than two events at the same time it's very difficult to read the text in the boxes, it would be nicer to read if there's a way to display the event's overlapped, just like Apple Calendar does.

Describe your use case for implementing this feature

Two events with similar time intervals.

Additional context

Screen Shot 2019-06-12 at 7 55 27 AM
matts-bot[bot] commented 5 years ago

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider supporting me on Patreon

mattlewis92 commented 5 years ago

Thanks for opening an issue, I do really like this idea as the UX is a lot cleaner, the problem is that you need to know how high the inner content is for each event which varies from app to app (in case you use a custom event template or use css to remove the text truncation). But what you can do is implement the logic yourself by tweaking each events left and width to make them overlap. I put together an example of how to do that here for you, it still needs some additional work to make it work for all cases but I hope it should be enough to get you on the right direction: https://stackblitz.com/edit/angular-bg7rbf?file=demo/custom-calendar-utils.ts Hope that helps! 😄

jonathansolorzn commented 5 years ago

Thanks, the example you posted does the job, as you said, there are multiple cases to consider, it would be nice to have such api in the near future.

kavinGurusamy commented 3 years ago

Did anybody tell me how to write our own api for calendar.