Calendar for filtering

Components, Ajax Framework, Utilities and More.
Post Reply
kingdan
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.

tnx
Move Fast, Break Things!

cabbage123
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
optimus.prime
Prime
Posts: 17328
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

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.

cabbage123
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"/>
</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.

cabbage123
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: No registered users and 11 guests