Fix [2891211] - VDate: once a date is set, its not possible to NULL it

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2891211&group_id=176962
Thanks to FreePath (Silvano)
This commit is contained in:
Carlos Ruiz 2009-11-03 17:25:08 +00:00
parent 80802d6e11
commit 487a0d630a
1 changed files with 3 additions and 3 deletions

View File

@ -370,7 +370,7 @@ public class VDate extends JComponent
*/
public void propertyChange (PropertyChangeEvent evt)
{
if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY))
if (evt.getPropertyName().equals(GridField.PROPERTY))
setValue(evt.getNewValue());
} // propertyChange
@ -540,7 +540,7 @@ public class VDate extends JComponent
AEnv.showCenterWindow(frame, cal);
Timestamp result = cal.getTimestamp();
log.config( "Result=" + result);
if (result == null)
if (result == null && !cal.isCancel()) // F3P: added check for 'isCancel',
result = value; // original
cal = null;
return result;
@ -550,7 +550,7 @@ public class VDate extends JComponent
* Set Field/WindowNo for ValuePreference
* @param mField MField
*/
public void setField (org.compiere.model.GridField mField)
public void setField (GridField mField)
{
m_mField = mField;
if (m_mField != null