Jul 07, 2014, 10:17 AM
[FIXED] [#521] [2.5.3] Datefield MMM format Issue
Hi there,
When we apply the Chinese Traditional Language to the Ext.Net's Datefield with datefield format set to "yyyy-MMM-dd", it failed to return the correct value by calling App.CtrlID.getValue().
In addition, we found that the issue seems to be caused by missing some code in Ext, which shown as following
Also, it seems that all language are having this problem except English and German (Probably the update of v2.5.2 #5839 fixed it?).
Will that be possible to have an update or temporary solution regarding this?
Thanks.
Regards,
Vincent
When we apply the Chinese Traditional Language to the Ext.Net's Datefield with datefield format set to "yyyy-MMM-dd", it failed to return the correct value by calling App.CtrlID.getValue().
In addition, we found that the issue seems to be caused by missing some code in Ext, which shown as following
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial
Software License Agreement provided with the Software or, alternatively, in accordance with the
terms contained in a written agreement between you and Sencha.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314)
*/
/**
* Traditional Chinese translation
* By hata1234
* 09 April 2007
*/
Ext.onReady(function() {
var parseCodes;
if (Ext.Date) {
Ext.Date.monthNames = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
Ext.Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')";
Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')";
parseCodes = {
g: 1,
c: "if (/(上午)/i.test(results[{0}])) {\n"
+ "if (!h || h == 12) { h = 0; }\n"
+ "} else { if (!h || h < 12) { h = (h || 0) + 12; }}",
s: "(上午|下午)",
calcAtEnd: true
};
Ext.Date.parseCodes.a = Ext.Date.parseCodes.A = parseCodes;
}
if (Ext.util && Ext.util.Format) {
Ext.apply(Ext.util.Format, {
thousandSeparator: ',',
decimalSeparator: '.',
currencySign: '\u00a5',
// Chinese Yuan
dateFormat: 'Y/m/d'
});
}
});
Which should be/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial
Software License Agreement provided with the Software or, alternatively, in accordance with the
terms contained in a written agreement between you and Sencha.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314)
*/
/**
* Traditional Chinese translation
* By hata1234
* 09 April 2007
*/
Ext.onReady(function() {
var parseCodes;
if (Ext.Date) {
Ext.Date.monthNames = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
Ext.Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
/* Seems missing this assignment */
/************************************************/
Ext.Date.monthNumbers = {
一月: 0,
二月: 1,
三月: 2,
四月: 3,
五月: 4,
六月: 5,
七月: 6,
八月: 7,
九月: 8,
十月: 9,
十一月: 10,
十二月: 11
};
/************************************************/
Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')";
Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')";
parseCodes = {
g: 1,
c: "if (/(上午)/i.test(results[{0}])) {\n"
+ "if (!h || h == 12) { h = 0; }\n"
+ "} else { if (!h || h < 12) { h = (h || 0) + 12; }}",
s: "(上午|下午)",
calcAtEnd: true
};
Ext.Date.parseCodes.a = Ext.Date.parseCodes.A = parseCodes;
}
if (Ext.util && Ext.util.Format) {
Ext.apply(Ext.util.Format, {
thousandSeparator: ',',
decimalSeparator: '.',
currencySign: '\u00a5',
// Chinese Yuan
dateFormat: 'Y/m/d'
});
}
});
For your reference, the problematic file seems to be "locale/ext-lang-zh-TW-js/ext.axd"Also, it seems that all language are having this problem except English and German (Probably the update of v2.5.2 #5839 fixed it?).
Will that be possible to have an update or temporary solution regarding this?
Thanks.
Regards,
Vincent
Last edited by Daniil; Jul 08, 2014 at 6:07 AM.
Reason: [FIXED] [#521] [2.5.3]