twinssbc / Ionic-Calendar

A calendar directive for Ionic framework
http://twinssbc.github.io/Ionic-Calendar/demo
MIT License
159 stars 73 forks source link

Week/day view events take up the whole hour #15

Closed Manduro closed 8 years ago

Manduro commented 8 years ago

Hi again :)

Currently, when an event starts at e.g. 9.30 AM and end at 10.15 AM. It is displayed for 9.00-11.00 AM. Could we add the functionality to have it start and end at the correct times? I think that would be a great addition.

Cheers!

twinssbc commented 8 years ago

@Manduro Actually other people also raised similar question. IMO, there's some tradeoff to think about here. First, what's the unit of time a cell needs to measure, one hour, 30 mins, 15 mins, or even 1 min? The smaller granularity, the more cells to display which could impact the performance. Besides, it doesn't make sense to display an event starts at 9:30 and another event starts at 9:31 at different position in a mobile device. But I think it's worth to add 30mins option.

Manduro commented 8 years ago

@twinssbc Yes, I understand that trade off. I would personally like 15 minute steps.

But, I think that it won't be needed to display more cells, thus limiting the performance impact. We could just position it at a certain top percentage of the cell and reduce the height, right?

twinssbc commented 8 years ago

@Manduro You are correct. I will add 30 and 15 mins options.

Manduro commented 8 years ago

@twinssbc Very nice!

twinssbc commented 8 years ago

@Manduro I committed the change to allow 15 and 30 mins steps in a separate branch https://github.com/twinssbc/Ionic-Calendar/tree/step

Could you give it a try to see if it works as expected? Thanks.

Manduro commented 8 years ago

@twinssbc It seems to be running great! Thanks again. I will report on any issue I run into.