Build a simple locale file named 'easyui-lang-se_SW.js' and save it to the 'locale' directory, it looks line this.
if ($.fn.datebox){
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
};
$.fn.datebox.defaults.parser = function(s){
if (!s) return new Date();
var ss = s.split('-');
var y = parseInt(ss[0],10);
var m = parseInt(ss[1],10);
var d = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
};
}
Register this locale file in the 'easyloader'.
<script type="text/javascript">
$.extend(easyloader.locales, {
'se_SW': 'easyui-lang-se_SW.js'
});
easyloader.locale = 'se_SW';
</script>