We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing of text in 'APPLY" and "CANCEL" buttons

Thread ID:

Created:

Updated:

Platform:

Replies:

140839 Nov 9,2018 04:57 PM UTC Nov 15,2018 06:53 AM UTC Angular - EJ 2 3
loading
Tags: ColorPicker
Grzegorz Golen
Asked On November 9, 2018 04:57 PM UTC

Dear Sirs, 

I have used element "ColorPicker" in our application. I would like to change the text in butons "APPLY" and "CANCEL" of this element (respectively for "PICK THIS" and "LOOK FURTHER"). It is not the issue of region (no localization) - I would like to change it permanently for all users. 

I have not found in documentation way how to do this. Could you please describe how this change to ColorPicker can be done?

Kind regards, 

Grzegorz Goleń 

Silambarasan I [Syncfusion]
Replied On November 10, 2018 07:16 AM UTC

Hi Grzegorz, 
 
Thank you for contacting Syncfusion support. 
 
Your requirement “To change the text in butons "APPLY" and "CANCEL"” can be achievable in ColorPicker by localize it using our localization library. Please refer the below code example. 
 
Stackblitz sample: 
 
component.ts 
 
//… 
import { L10n } from '@syncfusion/ej2-base'; 
 
//… 
 
L10n.load({ 
    'en-US': { 
        'colorpicker': { 
            'Apply': 'PICK THIS', 
            'Cancel': 'LOOK FURTHER', 
        } 
    } 
}); 
 
 
Please refer the below our help documentation for more details. 
 
Regards, 
Silambarasan 


Grzegorz Golen
Replied On November 14, 2018 09:23 AM UTC

Hi Silambarasan, 

thank you for your response, however please note that I have stressed that I cannot change it by localization because this feature should not be the matter of localization, it would be poor design, because the intention and the reasons for such project is to have it changed regardless of localization. It should be an easily editable property of element Color Picker. Does this element proivde the simple possibility to change the text in buutons without implementation of the localization mechanismus?

Kind regards, 

Grzegorz 

Silambarasan I [Syncfusion]
Replied On November 15, 2018 06:53 AM UTC

Hi Grzegorz, 

Thanks for your update. 

We would like to let you know that, the recommended way to achieve your requirement “To change the text in ‘APPLY’ & ‘CANCEL’ buttons” by localize it using our localization library. However, as based on your request – we have changed the button text by using ‘open’ client-side event in ColorPicker. Please refer the below code example. 

Stackblitz Sample: 

HTML 

<input ejs-colorpicker #colorpicker id='color-picker' (open)="onOpen($event)" type='color' /> 


COMPONENT.TS 

public onOpen(args: OpenEventArgs): void {       
  var applyBtnElem, cancelBtnElem; 
   
  applyBtnElem = args.element.querySelector(".e-apply"); 
  cancelBtnElem = args.element.querySelector(".e-cancel"); 
 
  applyBtnElem.textContent = 'PICK THIS'; 
  applyBtnElem.title = 'Pick This'; 
 
  cancelBtnElem.textContent = 'LOOK FURTHER'; 
  cancelBtnElem.title = "Look Further"; 
 
} 


Could you please check the above sample and get back to us if you need any further assistance? 

Regards, 
Silambarasan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;