Nicolas Bouillon created TAP5-2438:
--------------------------------------

             Summary: DateField companion button is difficult to find via 
Javascript
                 Key: TAP5-2438
                 URL: https://issues.apache.org/jira/browse/TAP5-2438
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.4
            Reporter: Nicolas Bouillon


In org.apache.tapestry5.corelib.components.DateField#beginRender there is a 
companion button added (when clicked, a calendar appears).

{code:java}
        writer.element("button",
                "type", "button",
                "class", "btn btn-default",
                "alt", "[Show]");

        writer.element("span", "class", "glyphicon glyphicon-calendar");
        writer.end(); // span

        writer.end(); // button
{code}

It would be convenient to allow adding a custom class to this button, of to add 
a grouping div for the input and the button, with a chosable id, so the button 
can be selected easily via Javascript.

My use case is to hide the field, but currently only the input element is 
hidden, and the companion button stays displayed.

I can provide a patch, but I would prefer to have some feedback on this before. 
Is the feature welcome, and how it's prefered to be implemented ?





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to