Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with OwlDateTimeIntl Label Not Updating in Angular 18 #208

Open
kelvinsleonardo opened this issue Dec 17, 2024 · 1 comment
Open

Comments

@kelvinsleonardo
Copy link

kelvinsleonardo commented Dec 17, 2024

Description:

I am using Angular version 18. In my app.config.ts, I imported the required providers as follows:

@Injectable()
export class DefaultIntl extends OwlDateTimeIntl {
  cancelBtnLabel = translateText('MG119');
  setBtnLabel = translateText('MG952');
}

export const appConfig: ApplicationConfig = {
  providers: [
    provideZoneChangeDetection({eventCoalescing: true}),
    provideRouter(routes),
    provideAnimations(),
    importProvidersFrom(
      OwlDateTimeModule,
      OwlNativeDateTimeModule
    ),
    {provide: OwlDateTimeIntl, useClass: DefaultIntl}
  ]
};

However, the custom labels (cancelBtnLabel and setBtnLabel) are not being updated in the date-time picker.

Is there a solution to this issue?

@faraz-ahmad-uft
Copy link

Hey @kelvinsleonardo, are you able to find a way to update the labels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants