File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ import { CalendarUtils } from '../../providers/calendarUtils.provider';
64
64
[tooltipAppendToBody]="tooltipAppendToBody"
65
65
[tooltipTemplate]="tooltipTemplate"
66
66
[customTemplate]="cellTemplate"
67
- (click)="dayClicked.emit({day: day} )"
67
+ (click)="handleDayClick($event, day)"
68
68
(highlightDay)="toggleDayHighlight($event.event, true)"
69
69
(unhighlightDay)="toggleDayHighlight($event.event, false)"
70
70
mwlDroppable
@@ -314,6 +314,16 @@ export class CalendarMonthViewComponent
314
314
this . eventTimesChanged . emit ( { event, newStart, newEnd } ) ;
315
315
}
316
316
317
+ /**
318
+ * @hidden
319
+ */
320
+ handleDayClick ( clickEvent : any , day : MonthViewDay ) {
321
+ // when using hammerjs, stopPropagation doesn't work. See https://github.com/mattlewis92/angular-calendar/issues/318
322
+ if ( ! clickEvent . target . classList . contains ( 'cal-event' ) ) {
323
+ this . dayClicked . emit ( { day } ) ;
324
+ }
325
+ }
326
+
317
327
private refreshHeader ( ) : void {
318
328
this . columnHeaders = this . utils . getWeekViewHeader ( {
319
329
viewDate : this . viewDate ,
You can’t perform that action at this time.
0 commit comments