Menu

#4788 (ok 4.3.12) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker

4.3.11
fixed
None
Low
2015-03-16
2015-03-05
No
  1. Double click on the date
  2. A datepicker widget appears, also a checkbox for NULL, but this is hidden under the datepicker and thus not selectable

Tested in current nightly in Firefox and Chrome

CREATE TABLE IF NOT EXISTS `test` (
  `ID` int(11) NOT NULL,
  `date` date DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `test` (`ID`, `date`) VALUES
(1, '2015-02-06');

ALTER TABLE `test`
  ADD PRIMARY KEY (`ID`);

Discussion

  • Chathura Widanage

     

    Last edit: Chathura Widanage 2015-03-05
  • Chathura Widanage

    Hi, I have resolved the issue. I am a new comer here and don't know what should I do next.. What I did was creating a pull request in github. Have I followed the correct route in resolving bugs?

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-03-05

      Hi Chathura Widanage, and thanks for your submission. Yes I do see your pull request and it looks like you submitted it correctly. We'll make any comments regarding the code/submission directly on that pull request so as to not clutter this tracker.

       

      Last edit: Isaac Bennetch 2015-03-05
  • Marc Delisle

    Marc Delisle - 2015-03-05

    Can be reproduced in 4.3 and 4.4 as well.

     
  • Marc Delisle

    Marc Delisle - 2015-03-05
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2015-03-05
    • summary: Inline edit of DATE fields with NULL, NULL checkbox is under datepicker --> (ok 4.4) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker
    • status: open --> resolved
    • Group: Latest_Git --> 4.3.11
    • Priority: Normal --> Low
     
  • Marc Delisle

    Marc Delisle - 2015-03-05
    • summary: (ok 4.4) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker --> (ok 4.3.12) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker
     
  • Raimund Meyer

    Raimund Meyer - 2015-03-06

    The problem is fixed, but now there is a gap between the input and the datepicker when the column is not NULL, i.e. there is no checkbox

     
  • Chathura Widanage

    Yes,that is because it is adding a marginTop in every case. I sent a fix without adding a margin, but integrating Checkbox and datepicker inside the same div. But my fix was not merged as some one had already sent this margin Fix.

     
  • Atul Pratap Singh

    Chathura,
    Please see the comments on your pull request, there are side effects remaining to be fixed.

     
  • Atul Pratap Singh

    • summary: (ok 4.3.12) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker --> Inline edit of DATE fields with NULL, NULL checkbox is under datepicker
    • status: resolved --> open
    • Priority: Low --> Normal
     
  • Atul Pratap Singh

    • assigned_to: Marc Delisle --> Atul Pratap Singh
     
  • Chathura Widanage

    Hi,
    I updated my fix with following changes..

    Datepicker works now when textfield value is null: fix
    Null check automatically un checks when date is picked : added
    Null check field and date picker includes in the same div : improvement
    Date/Time doesn't reset when double clicked. : fix

     
  • Atul Pratap Singh

    • summary: Inline edit of DATE fields with NULL, NULL checkbox is under datepicker --> (ok 4.3.12) Inline edit of DATE fields with NULL, NULL checkbox is under datepicker
    • status: open --> resolved
    • Priority: Normal --> Low
     
  • Raimund Meyer

    Raimund Meyer - 2015-03-11

    In which branch is this fixed? Because if I try this in current master, it's even worse than before, as I am stuck in a state like in the screenshot, whereas before the timepicker would go away and reveal the NULL checkbox.

     
  • Atul Pratap Singh

    On current master, with the same table structure as given in this ticket's description, I can't reproduce this error when using datepicker or the null checkbox to change the value.
    But it is happening when you manually try to empty the field, which as I check is reproducible from before this bug or fix. You are supposed to press escape to come out of that situation.

     
  • Raimund Meyer

    Raimund Meyer - 2015-03-12

    Please have a look at the attached screenshot, you can see that it's the current master at http://demo.phpmyadmin.net/master/ with the given table structure, and there is no checkbox.

    I have deleted the cache.

     
  • Raimund Meyer

    Raimund Meyer - 2015-03-12

    Ah OK, now I see the checkbox, I just didn't notice before because it's now under the datepicker. But the position looks a bit odd anyway like it's partly hidden by the datpicker

     
  • Raimund Meyer

    Raimund Meyer - 2015-03-13

    Please have a look at the attached screenshot. The box with the checkbox is still mostly hidden, the calculation of the position seems not correct.

     
  • Atul Pratap Singh

    Ok, but I can see it well in Chromium and in Firefox, which browser are you testing?

     
  • Raimund Meyer

    Raimund Meyer - 2015-03-13

    It's more obvious in Firefox than in Chromium, and it seems to be related to column comments that make the header higher. Like this table:

    CREATE TABLE IF NOT EXISTS `test2` (
      `ID` int(8) unsigned NOT NULL,
      `Test_coumn_1` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT 'fsd fsdf sdf sdfsd sdfsdfs dfsdf ssd ffsdf sdf sdfsd fsdfsfsdf sdf sfsdf sdfsdf sdfsdf sdf sdf',
      `Test_coumn_2` smallint(5) unsigned DEFAULT NULL COMMENT 'dsf sdf sfs dfd sfs fsd fsdf sdf sfsdfs dfsdf sfs fsdf sdf sfs f sdfs ddfsdf sfsdf',
      `Test_coumn_3` datetime NOT NULL,
      `Test_coumn_4` date DEFAULT NULL,
      `Test_coumn_5` smallint(5) unsigned NOT NULL,
      `Test_coumn_6` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
      `Test_coumn_7` text COLLATE utf8_unicode_ci NOT NULL,
      `Test_coumn_8` tinyint(3) unsigned NOT NULL
    ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    INSERT INTO `test2` (`ID`, `Test_coumn_1`, `Test_coumn_2`, `Test_coumn_3`, `Test_coumn_4`, `Test_coumn_5`, `Test_coumn_6`, `Test_coumn_7`, `Test_coumn_8`) VALUES
    (1, '25C6AE3E', 28130, '2015-04-17 11:35:07', '2015-03-12', 250, 'fsdfsf sf sdf sdf sdf sdf sdfs fsdf sdfsd fsd fsdfsdfsdf', 'ZZZsdf fds fsd fsdfsd fsdf sdfsdf sfsdf sfsdfsdfsdfsdfsdfsdfsdfsd fsdfsdfsf sf sdf', 0);
    
     
  • Raimund Meyer

    Raimund Meyer - 2015-03-13

    Couldn't the checkbox be integrated in the same div as the datepicker, like the sliders are on DATETIME fields?

     
  • Atul Pratap Singh

    Ok, with this structure the problem is visible, checkbox is currently in .edit_area, putting it in the outer div, as sibling to the datepicker, seems to solve the problem.
    I think putting in datepicker div will not be consistent as null checkbox is needed for other types of fields as well other than date related.

     
  • Marc Delisle

    Marc Delisle - 2015-03-14
    • Status: resolved --> fixed
     
  • Atul Pratap Singh

    Raimund, can you still reproduce any problems related to the datepicker including the null checkbox on current QA_4_4 or master?

     
  • Raimund Meyer

    Raimund Meyer - 2015-03-16

    Thanks, now it looks like expected :-)