diff options
author | Anastasia Smirnova <anasmi@utu.fi> | 2018-10-24 11:30:16 +0300 |
---|---|---|
committer | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2018-10-24 11:30:16 +0300 |
commit | 5a9cd49321d57822ff8d603fea81ebd7746e1fba (patch) | |
tree | 966b331dffca04790fdf849dc4abb741e72ac226 /client | |
parent | 6266f11b6d3cffdfdd56a3054367cbbf9b368e2c (diff) | |
download | vaadin-framework-5a9cd49321d57822ff8d603fea81ebd7746e1fba.tar.gz vaadin-framework-5a9cd49321d57822ff8d603fea81ebd7746e1fba.zip |
Update time in ReadOnly state of DateTimeCalendar (#11269)
Fix https://github.com/vaadin/framework/issues/11268
```buildTime()``` function re-initializes ListBoxes for hours,minutes and seconds values. We need to set correct values in those ListBoxes, before assigning value to the labels displayed instead of those ListBoxes in ReadOnly state, as , otherwise, the selectedItemIndex returns 0.
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VDateTimeCalendarPanel.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VDateTimeCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VDateTimeCalendarPanel.java index 3460cdfbbf..259502b98a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VDateTimeCalendarPanel.java +++ b/client/src/main/java/com/vaadin/client/ui/VDateTimeCalendarPanel.java @@ -119,6 +119,9 @@ public class VDateTimeCalendarPanel sec.addChangeHandler(this); } + // Update times + updateTimes(); + final String delimiter = getDateTimeService().getClockDelimeter(); if (isReadonly()) { int h = 0; @@ -171,9 +174,6 @@ public class VDateTimeCalendarPanel return; } - // Update times - updateTimes(); - ListBox lastDropDown = getLastDropDown(); lastDropDown.addKeyDownHandler(event -> { boolean shiftKey = event.getNativeEvent().getShiftKey(); |