BF [ adempiere-Bugs-1660595 ] Date field: incorrect functionality on paste

This commit is contained in:
teo_sarca 2007-02-16 23:00:44 +00:00
parent d920109b47
commit 8b6f606c80
1 changed files with 11 additions and 2 deletions

View File

@ -447,8 +447,17 @@ public class VDate extends JComponent
if (m_text == null || m_text.getText() == null)
return;
Object value = getValue();
if (value == null && isMandatory() )
setValue(startCalendar(this, getTimestamp(), m_format, m_displayType, m_title));
if (value == null && isMandatory() ) {
// teo_sarca [ 1660595 ] Date field: incorrect functionality on paste
// setValue(startCalendar(this, getTimestamp(), m_format, m_displayType, m_title));
Timestamp ts = startCalendar(this, getTimestamp(), m_format, m_displayType, m_title);
if (ts != null) {
setValue(ts);
}
else {
setValue(m_oldText);
}
}
else
setValue(value);
} // focusLost