Skip to content
This repository has been archived by the owner. It is now read-only.

showTimesOnWeekView issues #536

marckar opened this Issue Feb 9, 2017 · 1 comment


None yet
2 participants
Copy link

marckar commented Feb 9, 2017

Bug description:

I've noticed 2 small issues with showTimesOnWeekView parameter.
Both of them for showTimesOnWeekView = true;

Plunker based on select range demo

1st is connected to updateDays in MwlCalendarHourListCtrl.
Directive itself is great, but it does not know in which view it is (week or day).

But line:

viewDate: calendarConfig.showTimesOnWeekView ? moment(vm.viewDate).startOf('week').toDate() : moment(vm.viewDate).toDate(), hourSegments: 60 / vm.dayViewSplit

only checks showTimesOnWeekView param, thus day view ends with 1st day of week it belongs to.

Possible solution:
add any extra param to HourList directive (ex. view) and in controller do it like:

(... updateDays func ...)
var viewDate = vm.viewDate;
if (vm.view === 'week') {
    if (calendarConfig.showTimesOnWeekView) {
        viewDate = moment(viewDate).startOf('week');
vm.hourGrid = calendarUtils.getDayViewHourGrid({
    viewDate: moment(viewDate).toDate(),
    hourSegments: 60 / vm.dayViewSplit,
    dayStart: {
        hour: dayStart[0],
        minute: dayStart[1]
    dayEnd: {
        hour: dayEnd[0],
        minute: dayEnd[1]

2nd issue is about hour fragments of week view (something with css I think, could not pin it down).

It's fine for days 29.01 to 03.02, but when you try to range-select/click 12AM of 04.02 (or any last day of week in view), you cannot do so, as hour segments start DIRECTLY under 12AM label.

Best regards and good luck.


Angular: 1.6
Calendar library: 0.28
Browser name and version: Chrome 55, Firefox 51


This comment has been minimized.

Copy link

mattlewis92 commented Feb 19, 2017

Thanks for the bug report, I'll make sure to get that fixed up in the next release!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.