From 7064e047a324bd61c47b11f250e3221efac66c48 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 22 Jan 2014 08:37:32 -0500 Subject: [PATCH] bug #4218 Chrome behavior with date fields Signed-off-by: Marc Delisle --- ChangeLog | 1 + libraries/insert_edit.lib.php | 5 ++--- test/libraries/PMA_insert_edit_test.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bde2af2dc9..4e4c3e8ad2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug #4241 Confusing dialog when trying to create an already existing user - bug #4239 Missing LIMIT clause for some queries - rfe #1489 Do not show create icon when user has no privileges +- bug #4218 Chrome behavior with date fields 4.1.5.0 (2014-01-17) - bug #3780 Allow aborting loading pages diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php index 7370c3ee7a..1d3e394260 100644 --- a/libraries/insert_edit.lib.php +++ b/libraries/insert_edit.lib.php @@ -1181,16 +1181,15 @@ function PMA_getHTMLinput($column, $column_name_appendix, $special_chars, ); $input_type = 'text'; + // do not use the 'date' or 'time' types here; they have no effect on some + // browsers and create side effects (see bug #4218) $the_class = 'textfield'; if ($column['pma_type'] === 'date') { $the_class .= ' datefield'; - $input_type = 'date'; } elseif ($column['pma_type'] === 'datetime' || substr($column['pma_type'], 0, 9) === 'timestamp' ) { $the_class .= ' datetimefield'; - } elseif ($column['pma_type'] === 'time') { - $input_type = 'time'; } $input_min_max = false; if (in_array( diff --git a/test/libraries/PMA_insert_edit_test.php b/test/libraries/PMA_insert_edit_test.php index 235361bfc6..2a27bfb9ae 100644 --- a/test/libraries/PMA_insert_edit_test.php +++ b/test/libraries/PMA_insert_edit_test.php @@ -1257,7 +1257,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase $result = PMA_getHTMLinput($column, 'a', 'b', 30, 'c', 23, 2, 0); $this->assertEquals( - '', $result );