ngx-daterangepicker-material
ngx-daterangepicker-material copied to clipboard
get and set should work with the same type
Versions
- Angular version: 14.2.0
- typescript: 4.7.4
- ngx-daterangepicker-material: 6.0.2
Describe the bug
Code is not compiling due to this error in daterangepicker.component.d.ts :
The return type of a 'get' accessor must be assignable to its 'set' accessor type Type 'null' is not assignable to type 'string | Dayjs'.
The issue is valid for attributes maxDate and minDate
To Reproduce Steps to reproduce the behavior:
- Compile
Expected behavior maxDate and minDate should have the same type so it's follow the typescript rules
It's working with the version 5.0.2. The issue started after the rework of getters.

Do you have this issue in the pipeline?
Having also this issue.
It should be the following :
get minDate(): dayjs.Dayjs | string;
set minDate(value: dayjs.Dayjs | string);
get locale(): LocaleConfig;
set locale(value: LocaleConfig);
get ranges(): DateRanges;
set ranges(value: DateRanges);
get maxDate(): dayjs.Dayjs | string;
The issue still persists with the latest v6.0.4. Can this be updated as per @Rapiiidooo comment?
Having also this issue.
It should be the following :
get minDate(): dayjs.Dayjs | string; set minDate(value: dayjs.Dayjs | string); get locale(): LocaleConfig; set locale(value: LocaleConfig); get ranges(): DateRanges; set ranges(value: DateRanges); get maxDate(): dayjs.Dayjs | string;