Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Bug: day-view-start time only works with exact hours #340

Closed
FatihTaskent opened this issue May 27, 2016 · 2 comments
Closed

Bug: day-view-start time only works with exact hours #340

FatihTaskent opened this issue May 27, 2016 · 2 comments
Labels

Comments

@FatihTaskent
Copy link

Hi matt,

First of all, compliments on this very beautiful calendar!

Bug description:

There is a bug with the day-view-start and day-view-end time not rendering the day view correctly if there are minutes involved in the time. When the start and end time of the calendar is set to exact hours, like "09:00", everything works fine.

If the start time is set to "09:30", the day view still starts at "09:00".

<mwl-calendar
  events="vm.events"
  view="vm.calendarView"
  view-date="vm.viewDate"
  day-view-start="09:30"
  day-view-end="11:30">
</mwl-calendar>

The day view grid still starts at 09:00 and ends at 12:00:
selection_089

on-timespan-click

Because of the grid, the on-timespan-click isn't working properly. When a time is clicked on the dayview, it is not returning the correct datetime. The time is shifted 30 minutes on each block.

For example:
The start-date-time is set to "09:30", afterwards the "09:00" block is clicked. The on-timespan-click returns a date object with the time value "09:30".
selection_093

If the block "09:30" is clicked, the time 10:00 is returned
selection_095

Plunker

The plunker demonstrating the bug :
http://plnkr.co/edit/vW0HpdMa489mJhN3vUdc?p=preview

This bug might be related to issue #337 as well.

Kind regards,

@mattlewis92
Copy link
Owner

Ah thanks for the details bug report, I've never used the day-view-start and day-view-end with anything that isn't rounded to the nearest hour which is probably why it doesn't work. Will get it fixed up as soon as I have some free time.

@mattlewis92
Copy link
Owner

Fixed in 0.20.1, thanks for reporting! 😄

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

No branches or pull requests

2 participants