title: Date picker not displaying in primefaces 4.0 due to validation of facesContext
body: <p>Hi I am having a technical issue with my web application (Primefaces 4.0, Java/Spring/Hibernate), I have validation on all my date such that the user cannot select a date in the future. When my validation is displayed on the form, it blocks all datepicker from being displayed.</p>
  
  <p>Below is the error in firebug:</p>
  
  <p>Error: TypeError: this.jqEl.datepicker is not a function
  src="#{request.contextPath}/javax.faces.resource/primefaces.js.xhtml?ln=primefaces"> - line 6</p>
  
  <p>Page source before validation is being displayed:</p>
  
  <pre><code>            &lt;head&gt;
  
  
      &lt;style type="text/css" media="screen"&gt;
      @import url("/BUS/resources/dojo/resources/dojo.css");
      @import url("/BUS/resources/dijit/themes/tundra/tundra.css");
      &lt;/style&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
      &lt;script type="text/javascript" src="/BUS/resources/dojo/dojo.js" djconfig="parseOnLoad: true" &gt;&lt;/script&gt;
  
           &lt;script type="text/javascript" src="/BUS/resources/spring/Spring.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/BUS/resources/spring/Spring-Dojo.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;dojo.require("dojo.parser");&lt;/script&gt;
  
      &lt;link href="/BUS/css/style.css" rel="stylesheet" type="text/css" /&gt; 
  
  
  
      &lt;link type="text/css" rel="stylesheet" href="/BUS/javax.faces.resource/theme.css.xhtml?ln=primefaces-aristo" /&gt;
  </code></pre>
  
  <p></p>
  
  
  
  
  
  
  
  <pre><code>    &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;
      &lt;meta http-equiv="Pragma" content="no-cache" /&gt;
      &lt;meta http-equiv="Cache-Control" content="no-cache" /&gt;
      &lt;meta http-equiv="Expires" content="Sat,  01 Dec 2001 00:00:00 GMT" /&gt;
  
  
      &lt;script type="text/javascript" src="/BUS/javax.faces.resource/primefaces.js.xhtml?ln=primefaces"&gt;&lt;/script&gt;
  
  
  
      &lt;link type="text/css" rel="stylesheet" href="/BUS/css/jsfdefault.css" /&gt;
  
      &lt;script type="text/javascript" src="/BUS/js/export.js"&gt;&lt;/script&gt;
      &lt;link type="text/css" rel="stylesheet" href="/BUS/javax.faces.resource/primefaces.css.xhtml?ln=primefaces" /&gt;
      &lt;style type="text/css"&gt;
  </code></pre>
  
  <p>Page source after validation is being displayed:</p>
  
  <pre><code> &lt;head&gt;
  
      &lt;style type="text/css" media="screen"&gt;
          @import url("/BUS/resources/dojo/resources/dojo.css");
          @import url("/BUS/resources/dijit/themes/tundra/tundra.css");
      &lt;/style&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
      &lt;script type="text/javascript" src="/BUS/resources/dojo/dojo.js" djconfig="parseOnLoad: true" &gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/BUS/resources/spring/Spring.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/BUS/resources/spring/Spring-Dojo.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;dojo.require("dojo.parser");&lt;/script&gt;
  
      &lt;link href="/BUS/css/style.css" rel="stylesheet" type="text/css" /&gt; 
  
  
      &lt;link rel="shortcut icon" href="/BUS/images/favicon.gif" /&gt;
      &lt;link type="text/css" rel="stylesheet" href="/BUS/javax.faces.resource/theme.css.xhtml?ln=primefaces-aristo" /&gt;
  
  
      &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;
      &lt;meta http-equiv="Pragma" content="no-cache" /&gt;
      &lt;meta http-equiv="Cache-Control" content="no-cache" /&gt;
      &lt;meta http-equiv="Expires" content="Sat,  01 Dec 2001 00:00:00 GMT" /&gt;
  
  
      &lt;script type="text/javascript" src="/BUS/javax.faces.resource/primefaces.js.xhtml?ln=primefaces"&gt;&lt;/script&gt;
  
  
  
      &lt;link type="text/css" rel="stylesheet" href="/BUS/css/jsfdefault.css" /&gt;
      &lt;link type="text/css" rel="stylesheet" href="/BUS/themes/bluesky/skin.css" /&gt;
      &lt;script type="text/javascript" src="/BUS/js/export.js"&gt;&lt;/script&gt;
  
              &lt;script type="text/javascript" src="/BUS/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&amp;amp;v=4.0"&gt;&lt;/script&gt;
  
             &lt;link type="text/css" rel="stylesheet" href="/BUS/javax.faces.resource/primefaces.css.xhtml?ln=primefaces" /&gt;
      &lt;style type="text/css"&gt;
  </code></pre>
  
  <p>I can see it adds a script for jquery.js in the page source after the validation. I think it creates a conflict and this is why my datepicker is not working. Can someone help on this ?</p>
  
  <p>Thanks</p>