mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.72k stars 866 forks source link

Issue drag to create event #1720

Closed c3d28 closed 5 months ago

c3d28 commented 5 months ago

Hello I copy the code from this page : https://mattlewis-github.com/angular-calendar/#/drag-to-create-events

but when i want to launch the server i have this issue :

Error: src/app/residence/residence-calendar/residence-calendar.component.ts:124:18 - error TS2769: No overload matches this call.
  Overload 1 of 5, '(observer?: PartialObserver<Event> | undefined): Subscription', gave the following error.
    Argument of type '(mouseMoveEvent: MouseEvent) => void' is not assignable to parameter of type 'PartialObserver<Event> | undefined'.
  Overload 2 of 5, '(next?: ((value: Event) => void) | undefined, error?: ((error: any) => void) | undefined, complete?: (() => void) | undefined): Subscription', gave the following error.

This error is from the mouseEvent in the subscribe part:

.subscribe((mouseMoveEvent: MouseEvent) => {
        const minutesDiff = ceilToNearest(
          mouseMoveEvent.clientY - segmentPosition.top,
          30
        );

Can you help me please ? I cant use Event instead of MouseEvent because clientY doesnt exist for Event.

Thank for your help.

matts-bot[bot] commented 5 months ago

This issue has been closed automatically as it did not follow the issue template, please open a new issue that follows the bug report or feature request template.

Thank you! ✌️