Author: hoang_to
Date: 2010-08-24 12:32:56 -0400 (Tue, 24 Aug 2010)
New Revision: 3914
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
Log:
EXOGTN-20: Fix error in validator of Start/End Publication Date
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
---
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2010-08-24
16:25:52 UTC (rev 3913)
+++
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2010-08-24
16:32:56 UTC (rev 3914)
@@ -73,17 +73,16 @@
{
// Specify whether or not date/time parsing is to be lenient.
sdf.setLenient(false);
- Date stDate = sdf.parse(s);
- s = stFormat.format(stDate);
+ sdf.parse(s);
}
catch (Exception e)
{
- throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
+ throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
return;
- throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
+ throw new MessageException(new
ApplicationMessage("DateTimeValidator.msg.Invalid-input", args,
ApplicationMessage.WARNING));
}
private boolean isValidDateTime(String dateTime)
Show replies by date