p:calendar

UI Components for JSF
Post Reply
Cosimus
Posts: 4
Joined: 27 Apr 2011, 17:55

27 Apr 2011, 18:10

Hello,

is it possible to have a list of dates and only make these dates "selectable" instead of all days ?

aliirawan
Posts: 26
Joined: 15 Nov 2010, 20:09
Location: Jakarta, Indonesia
Contact:

27 Apr 2011, 22:39

I like to explore new things. There's a way for everything. I believe.

Cosimus
Posts: 4
Joined: 27 Apr 2011, 17:55

28 Apr 2011, 10:11

Yes i have.
This way it`s possible to go from mindate="05/15/2010" to maxdate="07/15/2010" .
What i want to do is to mark for example: 05/15/2010, 06/15/2010, 06/20/2010, 07/01/2010 only, not from one date to another date,
but a list or an array of dates...

callahan
Posts: 768
Joined: 27 May 2010, 22:52

28 Apr 2011, 10:36

Perhaps you can achieve what you want with with the jQuery datepickers beforeShowDay event: http://jqueryui.com/demos/datepicker/. See also: http://stackoverflow.com/questions/5019 ... and-holida

Cosimus
Posts: 4
Joined: 27 Apr 2011, 17:55

28 Apr 2011, 11:00

I think i need something like this: http://developer.yahoo.com/yui/examples ... ender.html
But i don´t know how to do this with p:calendar...

callahan
Posts: 768
Joined: 27 May 2010, 22:52

28 Apr 2011, 11:12

I assumed you were using a version of PrimeFaces that uses the jQurery Datepicker. Older versions of PrimeFaces use the YUI Calendar control which is of course something very different.

Cosimus
Posts: 4
Joined: 27 Apr 2011, 17:55

29 Apr 2011, 15:22

What i want to do is to color some days. For example holidays.

Therfore i tried:

<script type="text/javascript">
myCalendar.addRenderer("15/05/2011", myCalendar.addRenderer.renderBodyCellRestricted);
</script>

But i did not see any result.
What can i do to solve these problem?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests