diff --git a/ChangeLog b/ChangeLog index 76b9065aa..d4f38db5a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,8 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-04-19 Michal Cihar + * libraries/tbl_change.js: Better return value formatting. + 2004-04-18 Michal Cihar - * libraries/tbl_change.js: Fixed caledar behavior for DATE fields. + * libraries/tbl_change.js: Fixed caledar behaviour for DATE fields. * libraries/auth/cookie.auth.lib.php: Fix LoginCookieValidity behaviour. * libraries/tbl_change.js, tbl_change.php: Add support for DATETIME. diff --git a/libraries/tbl_change.js b/libraries/tbl_change.js index 8c3c8fc17..02f28a80a 100644 --- a/libraries/tbl_change.js +++ b/libraries/tbl_change.js @@ -209,11 +209,17 @@ function initCalendar() { str += ""; dayInWeek = 0; } + dispmonth = 1 + month; + + yearstring = (year < 1000 ? year < 100 ? year < 10 ? '000' : '00' : '0' : '') + year; + monthstring = (dispmonth < 10 ? '0' : '') + dispmonth; + daystring = (i < 10 ? '0' : '') + i; + if (window.opener.dateType == 'datetime' || window.opener.dateType == 'date') { - actVal = year + "-" + dispmonth + "-" + i; + actVal = yearstring + "-" + monthstring + "-" + daystring; } else { - actVal = "" + (year < 1000 ? year < 100 ? year < 10 ? '000' : '00' : '0' : '') + year + (dispmonth < 10 ? '0' : '') + dispmonth + (i < 10 ? '0' : '') + i; + actVal = "" + yearstring + monthstring + daystring; } if (i == day) { style = ' class="selected"';