twinssbc / AngularJS-ResponsiveCalendar

A pure AngularJS responsive calendar directive
http://twinssbc.github.io/AngularJS-ResponsiveCalendar/demo/
MIT License
112 stars 77 forks source link

The time interval is not displayed correctly. #72

Closed Komald closed 6 years ago

Komald commented 6 years ago

The time slots having time in minutes is not getting displayed properly in week view and day view.

In the attached screen shot of week view, it's clear that the event start at 6.31 but on the calendar it's showing right from 6.00. Similarly in day view screen shot the event starting at 1:48 (nearing to 2:00) is showing right from 1:00 and end time as 4:38 is stretched upto 4:59. These are the screen shots from the demo page, but same thing is happening on my machine as well.

Please let me know the solution for this.

Cheers! week-view day-view

twinssbc commented 6 years ago

@Komald Are you saying the event should not occupy the whole cell, but part of the cell depending on the minute? Actually if you check other calendar controls, that is the default behavior. It's not reasonable to calculate the height of an event depending on the minutes. Let's say if you have an event starting from 1:00 to 1:01, the height of this event will be very small, you won't be able to select it.

Komald commented 6 years ago

Quite right for the small intervals you said, but for others if we can divide the hour in two parts and round up to nearing time it would be good. Similar to what's been happening in ui-calendar

I found that it's setting from calendar-tpls.js but I did't get time to dig around much. Will try to find something over couple of days.

twinssbc commented 6 years ago

I've implemented this feature in my other calendar controls. I could port this feature into this control, but will take some time.

Komald commented 6 years ago

Cool! Please let me know if you create some pull request for the same.

twinssbc commented 6 years ago

@Komald I have added 'step' option in the latest version. Feel free to give a try.

Komald commented 6 years ago

Awesome! That really did the job. I have updated the version and it's working seamless. Thanks vary much! I will proceed and close this issue then.