Ext.picker.Date updateDayText
Hi,
either I did not understand how to use the updateDayText method or it simply never worked.
Here is my override:
Code:
/**
* @author: Torsten Dinkheller (Mobile Game Design e.K., Germany)
*
* Updates the methods for the dayText, monthText, yearText
*/
Ext.define('App.override.picker.Date', {
override: 'Ext.picker.Date',
/**
* Updates the monthText configuration
*/
updateMonthText: function(newMonthText, oldMonthText) {
this.updateDateText(newMonthText, oldMonthText);
},
/**
* Updates the dayText configuraton
*/
updateDayText: function(newDayText, oldDayText) {
this.updateDateText(newDayText, oldDayText)
},
/**
* Updates the yearText configuration
*/
updateYearText: function(newYearText, oldYearText) {
this.updateDateText(newYearText, oldYearText);
},
/**
* Updates the Text configuration for day, month, year
*/
updateDateText: function(newText, oldText) {
var innerItems = this.getInnerItems(),
ln = innerItems.length,
item, i;
//loop through each of the current items and set the title on the correct slice
if (this.initialized) {
for (i = 0; i < ln; i++) {
item = innerItems[i];
if ((typeof item.getTitle() == "string" && item.getTitle() == oldText) || (item.getTitle().getHtml() == oldText)) {
item.setTitle(newText);
}
}
}
}
});