简体   繁体   English

如何覆盖extjs(sencha)中datepicker按钮的文本?

[英]how can i override the text of datepicker's button in extjs(sencha)?

i intend to override the text of datepicker's buttons in extjs(modern) which display as 'cancel' and 'done',i tried both 我打算在显示为'cancel'和'done'的extjs(modern)中覆盖datepicker按钮的文本,我尝试了两者

{
    xtype: 'datepickerfield',
    label: 'label',
    name: 'birthday',
    defaultPhonePickerConfig  :{
        doneButton : '确定',
        cancelButton : '取消'
    } 
}

and

Ext.define("Ext.locale.zh_CN.field.DatePicker", {  
    override: "Ext.field.DatePicker",
    defaultPhonePickerConfig  :{
        doneButton : '确定',
        cancelButton : '取消'
    }
})   

but they not working,can you tell me what goes wrong? 但是他们没有用,你能告诉我哪里出了问题吗?

You just need to use picker config of datepickerfield instead of defaultPhonePickerConfig 您只需要使用datepickerfield的picker配置而不是defaultPhonePickerConfig

 picker: {
            doneButton: '确定',
            cancelButton: '取消'
        },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM