/** * Transfers input state between the input box and the drop down dialog. If drop down is true, * the date value from the input box is copied to the drop down. If false, the reverse is done. * * @param open The state of the drop down dialog. */ private void update(boolean open) { if (open) { datebox.setFocus(true); datebox.selectAll(); Date date = getDate(); updateDatebox(date); updateTimebox(DateUtil.hasTime(date) ? date : null); clearError(); } else if (ok) { Date date = DateTimeUtil.getTime(datebox, timebox); date = timebox.getValue() != null ? DateUtils.setMilliseconds(date, 1) : date; setDate(date); } }