Dear All,
am trying to use the following:
function myformatter(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return y.toString().substr(-2)+'.'+(m<10?('0'+m):m)+'.'+(d<10?('0'+d):d);
}
function myparser(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(d,m-1,y);
} else {
return new Date();
}
}
its working properly when I choose a date from the calendar, but the issue occurs once I try to write the date directly to datebox field, it will not change to appropriate date such as typing "18.01.15".....
please help me to solve this issue