Having a issue with the Month/Year RadDatePicker script provided at http://www.telerik.com/community/code-library/aspnet-ajax/calendar/month-year-picker.aspx. It is working as expected for other cultures except Chinese.
To reproduce this issue
1) download the sample and add a Culture="zh-CN" attribute to the RadDatePicker tag
2) Run the project and pick a 2 character month (i.e. Jan-Oct).
The month in the input box changes to Jan always unless a 3 character month is selected (i.e. Nov or Dec)
The issue is in the RadDatInputScript.js at Token.FindIndex where it assumes all the abbreviated month names are at least 3 characters long.
Token.FindIndex=function(_7d,_7e){
if(_7e.length<3){
return -1;
}
for(var i=0;i<_7d.length;i++){
if(_7d[i].toLowerCase().indexOf(_7e)==0){
return i;
}
I changed the condition to check for at least 2 characters instead of 3 but the format of the month in the month/year select popup drops the last character of the 3 character month to the next line. It is not a proper fix but for the moment it seems fine but I would like to have a proper fix.
Thanks
Savinda