-
1. Re: Richfaces UI calendar component
six-p4ck Nov 26, 2008 5:36 AM (in response to laurentm)Hello.
same here, i d'like to restrain selectable dates (min and max...) -
2. Re: Richfaces UI calendar component
ilya_shaikovsky Nov 26, 2008 6:26 AM (in response to laurentm)Sorry But you've used wrong attributes for your case :) This preload Dates should be used in order to use data model for client side switching mode. And the meaning of them - to define region of dates and load data for this region from model to the client on rendering.
You have two options there:
1) Just client side solution. you could use isDayEnabled attribute. You should define some js function which will take the date as a parameter and return if the date enabled. And define function name in this attribute.
2) you could create data model for the calendar and define disabled dates there. -
3. Re: Richfaces UI calendar component
six-p4ck Nov 26, 2008 8:43 AM (in response to laurentm)is there somewhere demo how work CalendarDataModel?
-
4. Re: Richfaces UI calendar component
six-p4ck Nov 26, 2008 9:17 AM (in response to laurentm)the Organizer Creation on demo is not very simple to understand...
Is there not any exemple more simple for just disable a few date? -
5. Re: Richfaces UI calendar component
ilya_shaikovsky Nov 26, 2008 9:26 AM (in response to laurentm)calendarDataModelItem has isEnabled method. which should return false for the dates which should not be enabled.
But in your case it seems for me that client side solution is more simple. -
6. Re: Richfaces UI calendar component
six-p4ck Nov 26, 2008 10:23 AM (in response to laurentm)i don't know with method use.
I have 5 calendar on my page and for each i have a start date and end date in backing bean.
I try with attribut isDayEnabled but i can't make it work... -
7. Re: Richfaces UI calendar component
laurentm Nov 26, 2008 10:42 AM (in response to laurentm)"ilya_shaikovsky" wrote:
Sorry But you've used wrong attributes for your case :) This preload Dates should be used in order to use data model for client side switching mode. And the meaning of them - to define region of dates and load data for this region from model to the client on rendering.
You have two options there:
1) Just client side solution. you could use isDayEnabled attribute. You should define some js function which will take the date as a parameter and return if the date enabled. And define function name in this attribute.
2) you could create data model for the calendar and define disabled dates there.
do you have any example regarding client-side soltion ?
I doubt I can mix EL expression and js... can I ? -
8. Re: Richfaces UI calendar component
laurentm Nov 26, 2008 3:35 PM (in response to laurentm)No more infos ?
-
9. Re: Richfaces UI calendar component
ronanker Nov 27, 2008 5:07 AM (in response to laurentm)"laurentm" wrote:
I doubt I can mix EL expression and js... can I ?
you can do something like :
"#{handler.test1 ? 'alert(\"'+var.libelle+'\")' : 'function('+(var.test ? handler.param1 : handler.param2)+','+handler.param3+')'}"
for exemple... -
10. Re: Richfaces UI calendar component
ronanker Nov 27, 2008 5:10 AM (in response to laurentm)or you can do something like :
onchanged="verifyDates(this,#{var.dateMin},#{var.dateMax})"