I have found some info and examples about using beforeShowDay
attribute to enable/disable days in p:calendar
component from PrimeFaces, it is easy and strightforward. But, these examples did not retrieve data from back bean, instead it calculate some conditions on JavaScript.
After some reviews on StackOverflow I found a great entry in Zenida’s blog, about how to do it.
However, this approach did not work on Chrome browser, neither Internet Explorer. So I started debugging and fixed some bugs. Now here you are with a complete solution valid for every browser.