Calendar for filtering

Components, Ajax Framework, Utilities and More.
Post Reply
Posts: 44
Joined: 06 May 2011, 19:55
Location: Aracaju, Brazil

06 May 2011, 20:04

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.

Move Fast, Break Things!

Posts: 3
Joined: 04 Aug 2011, 20:00

17 Aug 2011, 15:49

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!

User avatar
Posts: 17686
Joined: 05 Jan 2009, 00:21
Location: Cybertron

17 Aug 2011, 15:56

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

17 Aug 2011, 16:06

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"/>
</f:facet >

<h:outputText value="#{log.logDate}" />
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

17 Aug 2011, 19:29

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!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Melloware and 24 guests