ah... trattasi di calendariuzzo popup... ne avevo fatto uno anche io...
dalle modifiche che hai fatto mi sembra che tu voglia il formato 2005-11-25 senza l'orario. Se è così sostituisci le ultime 3 funzioni con queste
codice:
function str2dt (str_datetime) {
var re_date = /^(\d+)\-(\d+)\-(\d+)$/;
if (!re_date.exec(str_datetime))
return alert("Invalid Datetime format: "+ str_datetime);
return (new Date (RegExp.$1, RegExp.$2-1, RegExp.$3));
}
function dt2dtstr (dt_datetime) {
return (new String (
dt_datetime.getFullYear()+"-"+(dt_datetime.getMonth()+1)+"-"+dt_datetime.getDate()));
}
function dt2tmstr (dt_datetime) {
return "";
}