From b11947f775685dc0b97bda9084c4a58cbd1c0e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Sun, 18 Apr 2004 09:03:14 +0000 Subject: [PATCH] Fixed caledar behavior for DATE fields. --- ChangeLog | 3 +++ libraries/tbl_change.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fdc77395..604d4ce6b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-04-18 Michal Cihar + * libraries/tbl_change.js: Fixed caledar behavior for DATE fields. + 2004-04-18 Alexander M. Turek * lang/german-*.inc.php: Updates. diff --git a/libraries/tbl_change.js b/libraries/tbl_change.js index ec92a208b..014556272 100644 --- a/libraries/tbl_change.js +++ b/libraries/tbl_change.js @@ -138,7 +138,7 @@ function initCalendar() { /* Called for first time */ if (window.opener.dateField.value) { value = window.opener.dateField.value; - if (window.opener.type == 'date') { + if (window.opener.dateType == 'date') { date = value.split("-"); day = parseInt(date[2]); month = parseInt(date[1]) - 1; @@ -195,7 +195,7 @@ function initCalendar() { dayInWeek = 0; } dispmonth = 1 + month; - if (window.opener.type == 'date') { + if (window.opener.dateType == 'date') { actVal = year + "-" + dispmonth + "-" + i; } else { actVal = "" + (year < 1000 ? year < 100 ? year < 10 ? '000' : '00' : '0' : '') + year + (dispmonth < 10 ? '0' : '') + dispmonth + (i < 10 ? '0' : '') + i;