[REQUEST NEW FEATURE] Disable days on p:calendar

UI Components for JSF
Post Reply
nokiajavi
Posts: 61
Joined: 24 Feb 2013, 15:03
Location: España
Contact:

07 Jul 2016, 14:15

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.

smokeybandit
Posts: 277
Joined: 08 Jul 2013, 17:53

07 Jul 2016, 18:56

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.

nokiajavi
Posts: 61
Joined: 24 Feb 2013, 15:03
Location: España
Contact:

08 Jul 2016, 08:41

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.
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.


I think it's a good improvement , I have seen several angular pickdate that allow it, and I think it is quite useful.

Thanks

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

08 Jul 2016, 10:00

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...

nokiajavi
Posts: 61
Joined: 24 Feb 2013, 15:03
Location: España
Contact:

08 Jul 2016, 11:04

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

smokeybandit
Posts: 277
Joined: 08 Jul 2013, 17:53

11 Jul 2016, 17:25

nokiajavi wrote:
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.
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.


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't avoid the use of javascript since the datepicker is javascript.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests