As I can see, it's not possible to use a Calendar component for filtering in a datatable.
In my datatable i have two Date fields (Initial Date and Final Date) and i wish i could make a filter to show elements only between these Date fields.
Anyone have a suggestion?
ps: Will Primefaces have the option to customize the filter field? Something like a facet that we could do anything we want. It would be nice.
tnx
Calendar for filtering
-
- Posts: 3
- Joined: 04 Aug 2011, 20:00
I have the same problem here, don't know how to filter with calendar chosen date...Does anyone have any ideas or provide some hint? Thanks a lot!
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Calendar filtering is not supported, still you can place a calendar inside a column header and bind a dateSelect ajax behavior and do your own filtering.
-
- Posts: 3
- Joined: 04 Aug 2011, 20:00
I have revised my code as
<p:column headerText="Log Date">
<f:facet name="header">
<p:calendar id="beginDate" mode="popup" pattern="yyyy-MM-dd">
<p:ajax event="dateSelect" listener="viewLogs.handleDateSelect" update="logs"/>
</p:calendar>
</f:facet >
<h:outputText value="#{log.logDate}" />
</p:column>
to retrieve the log information within one day on calendar...but the result still not right...
<p:column headerText="Log Date">
<f:facet name="header">
<p:calendar id="beginDate" mode="popup" pattern="yyyy-MM-dd">
<p:ajax event="dateSelect" listener="viewLogs.handleDateSelect" update="logs"/>
</p:calendar>
</f:facet >
<h:outputText value="#{log.logDate}" />
</p:column>
to retrieve the log information within one day on calendar...but the result still not right...
Last edited by cabbage123 on 17 Aug 2011, 21:21, edited 1 time in total.
-
- Posts: 3
- Joined: 04 Aug 2011, 20:00
Also I have go through all the posts about calender and filter in forum, but didn't find too much posts that are helpful.
Could someone provide some more detailed information or examples? Thanks in advance!
Could someone provide some more detailed information or examples? Thanks in advance!
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests