First, ensure that you've declared the PrimeFaces tag library in your XML namespace. For the current PrimeFaces 2.x version, that is
xmlns:p="http://primefaces.prime.com.tr/ui"
Second, PrimeFaces comes along with a lot of CSS/JS resources which are supposed to be auto-included by a <h:head>
. The calendar component (and many others) are styled and activated by exactly those resources. So, in order to get them to auto-included, you need to ensure that you've a <h:head>
instead of <head>
in your master template. And to be consistent, replace <body>
by <h:body>
as well.
Update based on the comments, there was a JavaScript conflict. The <p:calendar>
works fine at its simplest form. It ceased to work because you've a jQuery menubar in your template which in turn would require a <script src="jquery.js">
. Since PrimeFaces already ships with jQuery bundled, it has most likely conflicted with the manual jQuery script include. You need to get rid of the manual jQuery script include.