danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
140 stars 60 forks source link

Translate buttons Not working #108

Closed zak293 closed 3 years ago

zak293 commented 3 years ago

Hey, I try translate button cancel and set. My code below. What is wrong ? I see always default labels.

Thanks :)

import { OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE, OwlDateTimeIntl, OwlDateTimeModule, OwlMomentDateTimeModule } from '@danielmoncada/angular-datetime-picker';

class DefaultIntl extends OwlDateTimeIntl { public cancelBtnLabel = 'TEXT FOR CANCEL'; public setBtnLabel = 'TEXT FOR SET'; }

providers: [ {provide: OwlDateTimeIntl, useClass: DefaultIntl}, ]

satifant commented 3 years ago

It works for me with

@Injectable()
class DefaultIntl extends OwlDateTimeIntl {
...
}

You might be missing @Injectable()?

fdc80 commented 3 years ago

@zak293 did you solved issue? I put external class and works.

danielmoncada commented 3 years ago

@zak293 closing, as guidance has already been provided to solve your issue.