rem: var timeRe = /(\d\d):(\d\d)(?::(\d\d))?/; 
add: var timeRe = /\b(\d{1,2}):(\d\d)(?::(\d\d))?/; 
context: function setFieldFromCalendar(type, args, date_field) {    var dates = args[0];    var setDate = dates[0];    // We can't just write the date straight into the field, because there     // might already be a time there.    var timeRe = /(\d\d):(\d\d)(?::(\d\d))?/;    var currentTime = timeRe.exec(date_field.value);    var d = new Date(setDate[0], setDate[1] - 1, setDate[2]);    if (currentTime) {        d.setHours(currentTime[1], currentTime[2]);        if (currentTime[3]) {            d.setSeconds(currentTime[3]);        }    }    var year = d.getFullYear();    // JavaScript's "Date" represents January as 0 and December as 11.    var month = d.getMonth() + 1;    if (month < 10) month = '0' + String(month);    var day = d.getDate();    if (day < 10) day = '0' + String(day);    var dateStr = year + '-' + month  + '-' + day;    if (currentTime) {        var hours = d.getHours();        if (hours < 10) hours = '0' + String(hours);        d.setHours(hours);        var minutes = d.getMinutes();        if (minutes < 10) minutes = '0' + String(minutes);        var seconds = d.getSeconds();        if (seconds > 0 && seconds < 10) {            seconds = '0' + String(seconds);        }        dateStr = dateStr + ' ' + hours + ':' + minutes;        if (seconds) dateStr = dateStr + ':' + seconds;    }    date_field.value = dateStr;    hideCalendar(date_field.id);}
meta: 3132	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3132/e621696be0f092e348e4534e1855c0a3146c2c9e/field.js/buggy/js/field.js