From 91c7b319e4eba8ff038e4bf6c566d95d05e71803 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Thu, 15 Feb 2007 13:23:23 +0000 Subject: [PATCH] bug fix [ 1660595 ] Date field: incorrect functionality on paste --- client/src/org/compiere/grid/ed/MDocDate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/org/compiere/grid/ed/MDocDate.java b/client/src/org/compiere/grid/ed/MDocDate.java index 926159575b..8d6b4e5dc2 100644 --- a/client/src/org/compiere/grid/ed/MDocDate.java +++ b/client/src/org/compiere/grid/ed/MDocDate.java @@ -175,7 +175,8 @@ public final class MDocDate extends PlainDocument implements CaretListener if (offset == 0 || length == 0) { // empty the field - if (length == m_mask.length() || length == 0) + // if the length is 0 or greater or equal with the mask length - teo_sarca, [ 1660595 ] Date field: incorrect functionality on paste + if (length >= m_mask.length() || length == 0) super.remove(offset, length); return; }