title: Symfony2, How to add a hidden date type field to a form?
body: <p>I am trying the scenario below : </p>
  
  <p>In <strong><code>myclassType</code></strong></p>
  
  <pre><code>public function buildForm(FormBuilder $builder, array $options)
  {
      $builder
          -&gt;add('day','hidden')
          -&gt;add('date', 'hidden' ) 
          -&gt;add('hours')
          -&gt;add('comment','textarea')
      ;
  }
  </code></pre>
  
  <p>In <strong><code>myclass</code></strong></p>
  
  <pre><code>class myclass
  {
      //.. Other stuff
  
      /**
       * @ORM\Column(type="date")
       *
       * @var date $date
       */
      protected $date;
  }
  </code></pre>
  
  <p>While rendering I get this error :</p>
  
  <pre><code>An exception has been thrown during the rendering of a template ("Catchable Fatal Error:
   Object of class DateTime could not be converted to string in 
  C:\wamp\www\PMI_sf2\app\cache\dev\twig\fb\40\8957f80f2358a6f4112c3427b387.php line 684") in
   form_div_layout.html.twig at line 171.
  </code></pre>
  
  <p>Any idea how I can make a Date type field hidden !??</p>