I would like to propose a new feature for the component p:calendar of PrimeFaces.
The ability to add an attribute to p:calendar (disableDays) to disable calendar days.
The days could be passed as an array of Date.
In this way it could have on one hand the feature to limit the calendar with MinDate and MaxDate, and also in that range , could be limited to select day with the new feature disabledays.
Thank you very much.
[REQUEST NEW FEATURE] Disable days on p:calendar
-
- Posts: 277
- Joined: 08 Jul 2013, 17:53
the calendar widget uses the datapicker javascript library I believe. There are a bunch of examples on google on how to disable specific days via datapicker functions.
Indeed , using javascript you can disable certain days with the onBeforeShow the calendar . But the question is able to do directly with an attribute in the calendar and by ELExpresion , avoiding the use of javascripts.smokeybandit wrote:the calendar widget uses the datapicker javascript library I believe. There are a bunch of examples on google on how to disable specific days via datapicker functions.
I think it's a good improvement , I have seen several angular pickdate that allow it, and I think it is quite useful.
Thanks
You can use EL in javascript. Adding every possible option/functionality of underlying components in attributes is way to cumbersome and with to little advantage. Take the example of jqPlot. If everything that is possible in using the 'extender' would be implemented in 'attributes' you'd need a single dedicated developer.
And you can put the EL in a pass-through attribute if you want and read that in a generic piece of javascript, so it is hidden. And even more so, you can wrap all this in a custom component if you want so it is even easier to use...
And you can put the EL in a pass-through attribute if you want and read that in a generic piece of javascript, so it is hidden. And even more so, you can wrap all this in a custom component if you want so it is even easier to use...
kukeltje wrote:You can use EL in javascript. Adding every possible option/functionality of underlying components in attributes is way to cumbersome and with to little advantage. Take the example of jqPlot. If everything that is possible in using the 'extender' would be implemented in 'attributes' you'd need a single dedicated developer.
And you can put the EL in a pass-through attribute if you want and read that in a generic piece of javascript, so it is hidden. And even more so, you can wrap all this in a custom component if you want so it is even easier to use...
If he is right . Thank you very much
-
- Posts: 277
- Joined: 08 Jul 2013, 17:53
You can't avoid the use of javascript since the datepicker is javascript.nokiajavi wrote:Indeed , using javascript you can disable certain days with the onBeforeShow the calendar . But the question is able to do directly with an attribute in the calendar and by ELExpresion , avoiding the use of javascripts.smokeybandit wrote:the calendar widget uses the datapicker javascript library I believe. There are a bunch of examples on google on how to disable specific days via datapicker functions.
I think it's a good improvement , I have seen several angular pickdate that allow it, and I think it is quite useful.
Thanks
-
- Information
-
Who is online
Users browsing this forum: No registered users and 31 guests