Class constructor CalendarDateFormatter cannot be invoked without 'new' in angular 15 version, working in earlier version of angular.
tsconfig: "target": "es5",
I want the target to be in es5.
Used as below:
@Injectable()
export class CustomDateFormatter extends CalendarDateFormatter {
public monthViewColumnHeader({ date, locale }: DateFormatterParams): string {
return formatDate(date, 'EEEEEE', locale);
}
}
as defined in node_modules/angular-calendar/modules/common/calendar-date-formatter.provider.d.ts.
Defined in component
selector: 'app-calendar-view',
templateUrl: './calendar-view.component.html',
styleUrls: ['./calendar-view.component.scss'],
providers: [
{
provide: CalendarDateFormatter,
useClass: CustomDateFormatter},
],
}
)
Minimal reproduction of the problem with instructions
Screenshots
Versions
@angular/core: 15.0.0
angular-calendar: :0.30.1 or above
Browser name and version: Chrome, Firefox and Edge.
Updating target to es6 works fine, but i am constrained from updating to es6.
Please help, on how to run the calendar with Ang15+ version having target set to es5.
Describe the bug
Class constructor CalendarDateFormatter cannot be invoked without 'new' in angular 15 version, working in earlier version of angular.
tsconfig: "target": "es5", I want the target to be in es5.
Used as below: @Injectable() export class CustomDateFormatter extends CalendarDateFormatter { public monthViewColumnHeader({ date, locale }: DateFormatterParams): string { return formatDate(date, 'EEEEEE', locale); } }
as defined in node_modules/angular-calendar/modules/common/calendar-date-formatter.provider.d.ts.
Defined in component selector: 'app-calendar-view', templateUrl: './calendar-view.component.html', styleUrls: ['./calendar-view.component.scss'], providers: [ { provide: CalendarDateFormatter, useClass: CustomDateFormatter}, ], } )
Minimal reproduction of the problem with instructions
Screenshots![image](https://user-images.githubusercontent.com/23524515/211334167-88511594-7f1d-4718-810d-3ff86c8bcf5c.png)
Versions
@angular/core
: 15.0.0angular-calendar
: :0.30.1 or aboveUpdating target to es6 works fine, but i am constrained from updating to es6. Please help, on how to run the calendar with Ang15+ version having target set to es5.