3

I am using PrimeFaces 5.0.5 with GlassFish server 3.1.2.2.

I added <p:calendar> inside a <ui:fragment> which is then included in another XHTML page.

When I open the select menu and scroll with the mouse wheel, the panel will float with the page.

I've already checked this question with a similar issue but not on the same component.

The same trick doesnt work for calendar. I've tried appending it to components around but none of them works.

Any feedback and comment are appreciated.

Many thanks.

<h:panelGrid columns="2"  id="..." style="margin: 0px 0px 30px 15px;">
    <h:outputText value="#{msg['startDate']}:"/>
        <p:calendar
            pattern="dd-MM-yyyy"
            converterMessage="#{msg['ocs.invalidStartDateFormat']}"
            value="#{cc.attrs.inputObject.usageHistoryStartDate}"
            disabled="#{cc.attrs.inputObject.usageHistoryBillingPeriodOption != 'CUSTOM_DATE_RANGE'}"
            showOn="button">
        </p:calendar>
    <h:outputText value="#{msg['endDate']}:" />
        <p:calendar
            pattern="dd-MM-yyyy"
            converterMessage="#{msg['invalidEndDateFormat']}"
            value="#{...}"
            disabled="#{...}"
            showOn="button">
        </p:calendar>
</h:panelGrid>

Issue screenshot

2
  • I also have same issue. Still don't have solution? Jul 19, 2016 at 9:28
  • Nope.. will ask on es.stackoverflow there's currently a reward program for bounty so I hope I can get something there :) Jul 19, 2016 at 15:49

1 Answer 1

0

Not sure if this would help you, but my workaround is to add a scroll event on the dialog or whatever container component you have. In the scroll event, you look for the datepicker element and hide it. Here is a snippet:

    $(document).ready(function() {
            var dialog1 = $('.ui-dialog .ui-dialog-content');

            dialog1.scroll(function() {
                $('#ui-datepicker-div').hide();
            });
        });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.