From 8b6f606c80b15c42537f4e0335e07036dc414d65 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Fri, 16 Feb 2007 23:00:44 +0000 Subject: [PATCH] BF [ adempiere-Bugs-1660595 ] Date field: incorrect functionality on paste --- client/src/org/compiere/grid/ed/VDate.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/src/org/compiere/grid/ed/VDate.java b/client/src/org/compiere/grid/ed/VDate.java index 42da863da4..214b8c9bf5 100644 --- a/client/src/org/compiere/grid/ed/VDate.java +++ b/client/src/org/compiere/grid/ed/VDate.java @@ -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