ngx-material-timepicker icon indicating copy to clipboard operation
ngx-material-timepicker copied to clipboard

[Feature] allow user to change label name

Open billyjov opened this issue 6 years ago • 10 comments

Regarding to this issue. How about add a possibility to just custom the existing label ? maybe using an optional @Input() ?

billyjov avatar Sep 23 '19 11:09 billyjov

You can replace buttons. I guess it's enough )

Agranom avatar Dec 21 '19 10:12 Agranom

For i18n, it would be much easier if we could globally inject the "OK" and "CANCEL" translations, maybe along with theme? What do you think?

mstawick avatar Jan 03 '20 14:01 mstawick

Okey, I'll add it in the next release

Agranom avatar Jan 12 '20 15:01 Agranom

@mstawick have you been able to add multilanguage?? how do you bind it with the existing label?

YurvaneeshDassagne avatar Aug 25 '20 08:08 YurvaneeshDassagne

@YurvaneeshDassagne Sorry, I'm on vacation now far away from my code :) and can't remember what I ended up doing. I can check when I'm back in around a week.

mstawick avatar Aug 25 '20 08:08 mstawick

@mstawick ok...thanks

YurvaneeshDassagne avatar Aug 25 '20 08:08 YurvaneeshDassagne

@Agranom Do you have any idea about how to bind multilanguage labels?

YurvaneeshDassagne avatar Aug 25 '20 08:08 YurvaneeshDassagne

@YurvaneeshDassagne You can provide custom buttons. Which i18n lib do you use ?

Agranom avatar Aug 25 '20 16:08 Agranom

@YurvaneeshDassagne FYI, I've defined templates like so:

<ng-template #okButton>
  <button mat-button color="primary" i18n>Save</button>
</ng-template>
<ng-template #cancelButton>
  <button mat-button color="primary" i18n>Cancel</button>
</ng-template>

And then referenced them like so:

        <ngx-material-timepicker #timePicker
                                 [confirmBtnTmpl]="okButton"
                                 [cancelBtnTmpl]="cancelButton"
                                .....></ngx-material-timepicker>

mstawick avatar Sep 01 '20 11:09 mstawick

Thank you a lot :-)

On Tue, Sep 1, 2020 at 3:16 PM Michał Stawicki [email protected] wrote:

@YurvaneeshDassagne https://github.com/YurvaneeshDassagne FYI, I've defined templates like so:

<ng-template #okButton> <ng-template #cancelButton>

And then referenced them like so:

    <ngx-material-timepicker #timePicker
                             [confirmBtnTmpl]="okButton"
                             [cancelBtnTmpl]="cancelButton"
                            .....></ngx-material-timepicker>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Agranom/ngx-material-timepicker/issues/223#issuecomment-684776995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOUEWXU6KSXG3SYQW5ND6DSDTJXDANCNFSM4IZJN6AA .

YurvaneeshDassagne avatar Oct 27 '20 10:10 YurvaneeshDassagne