Has anyone had any problems with the updating of the time value when using Vaadin DateField (or PopupDateField)? Whenever a new time is selected from the time drop downs located at the bottom of the popup calendar, the date textfield does not update with the new time selected. Only the day value updates properly when a different day is selected from the calendar. I have registered a Property.ValueChangeListener with my DateField, and through debug I’ve found that the valueChange() method is only entered when a different day is selected from the popup calendar (and hence updates value in textfield), and not when a different time is selected from the time drop downs. Is this a bug with Vaadin DateField? Or is there a workaround?
Any help would be much appreciated! Thanks in advance!
I encounter the same problem.
Apart from resolution_month and resolution_year, resolution_day also got problem.
You can try this in Vaadin demo page by first selecting March 31, then select feb 28. The date will change to March 28, which is incorrect.
I created tickets for these issues:
#5593 (Cannot select year/month in a PopupDateField with resolution year or month)
#5594 (Wrong date selected in PopupDateField when selecting 28.2 after 31.3)
and additionally
#5592 (PopupDateField calendar popup is not correctly updated when resolution is changed).
They will be fixed in the next release and in nightly builds before that.
Thank you for the responses. Artur, the problem I was having is different to the 3 tickets you created above. As described in my first post above, it’s to do with the DateField text box not updating the time selected from the time drop downs in the popup calendar. Is this a new bug? Or any workarounds?
I’m using vaadin-6.4.1, and I have the same issue, when I use the PopupDateField and set the resolution to ‘sec’ and immediate to ‘true’, then if I select hour/min/sec from the dropdown in the date picker popup window, value is not updated in the date text box.
Do you already have a solution for this?
The Vaadin DateField is not displaying correct time , it is always showing 12:00 AM
this java code properly displaying Date with Time .
DateFormat df =new SimpleDateFormat(“dd/MM/yyyy hh:mm a”);
WWMLogger.debug(“–> new DF formate :”+df.format(bean.getEntryDate()));
But below Vaadin Date Field is not displaying correct time.
DateField entryDateDtf = new DateField();
entryDateDtf.setDateFormat(" dd/MM/yyyy hh:mm a ");
entryDateDtf.setValue(new Date());
This is a three years old thread with somewhat different issues, so posting a new thread would probably have made more sense. Also, you didn’t mention which Vaadin version you are using.
This said, you probably just need to use DateField.setResolution(). If I remember correctly, the default formatting does hide the parts that are too low resolution but you have set your own formatting without having changed the resolution. The order of setting the resolution and the format might matter.
Hi I have some problem working with DateTimeField(Vaadin 8) while selecting the date the popup gets closed but while selecting time the popup remains open the text field gets updated but while retriving value from DateTimeField we cannot get the updated time. But if we select a time and click in the Vaadin UI then we are able to get the correct Time I don’t know whats the problem is I tried several things like UI.getCurrent().focus(); or focusing the the dateField before getting the value from DateField but dosen’t work at all.