FAQ
Author: lofwyr
Date: Wed Jun 15 12:52:02 2016
New Revision: 1748577

URL: http://svn.apache.org/viewvc?rev=1748577&view=rev
Log:
TOBAGO-1483: Date Picker
* fix missing icon, when there is no pattern.

Modified:
     myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java?rev=1748577&r1=1748576&r2=1748577&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java Wed Jun 15 12:52:02 2016
@@ -87,10 +87,13 @@ public class DateRenderer extends InRend
      writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON);
      writer.writeAttribute(HtmlAttributes.DISABLED, date.isDisabled() || date.isReadonly());

- if (StringUtils.containsAny(pattern, "yYMDdE")) {
+ final boolean hasDate = StringUtils.containsAny(pattern, "yYMDdE");
+ final boolean hasTime = StringUtils.containsAny(pattern, "Hhms");
+
+ if (hasDate || !hasTime) { // || !hasTime is, to have at least one icon
        writer.writeIcon(Icons.CALENDAR);
      }
- if (StringUtils.containsAny(pattern, "Hhms")) {
+ if (hasTime) {
        writer.writeIcon(Icons.CLOCK_O);
      }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedJun 15, '16 at 12:52p
activeJun 15, '16 at 12:52p
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Lofwyr: 1 post

People

Translate

site design / logo © 2019 Grokbase