forked from h2qutc/angular-material-components
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi, thank you for your great work on this library!
I encountered a TypeScript error related to the dateFilter property in NgxMatDatetimePickerInputV2<D>. It seems the getter and setter definitions are not compatible with the base types NgxDateFilterFn<D> or NgxMatDatepickerControl<D>.
Angular: 20.3.7
@ngxmc/datetime-picker: 20.1.0
Here’s the error message:
TS2416: Property 'dateFilter' in type 'NgxMatDatetimePickerInputV2<D>' is not assignable to the same property in base type 'NgxDateFilterFn<D>'.
Type '(date: D) => boolean' is not assignable to type '(date: D | null) => boolean'.
'D' could be instantiated with an arbitrary type which could be unrelated to 'D | null'.
Would it be possible to update the type definition of dateFilter to accept D | null as the parameter type? For example:
get dateFilter(): (date: D | null) => boolean;
set dateFilter(value: (date: D | null) => boolean);This would resolve the type incompatibility and align with the expected base type.
Thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels