title: Specifying a date range in a Symfony2 form
body: <p>In my Symfony2 application there is an entity called 'Appointment'. This entity has a field/property called "date". It has a format like: '2012-12-24'.</p>
  
  <p>I have created a form called AppointmentType, to be able to search for appointments based on their properties. The form is used in AppointmentController, and rendered to appointment.html.twig.</p>
  
  <p>So far so good. I can search appointments based on all fields. I can for instance search on a specific date (that is, on an exact match).</p>
  
  <p>However, I would like to be able to search for appointments given a date range (using a start and end date). The question would be: "Give me all appointments between this and that date." I've tried many things but can't figure it out in Symfony2.</p>
  
  <p>Some random thoughts here:</p>
  
  <ul>
  <li>Should I create two extra fields in the Appointment entity beside
  "date", call them "startdate" and "enddate", not link them to the
  MySql table but only use them for search?</li>
  <li>Should I do something in the form, creating two date fields linked to the same date property of the entity (seems to cause violation)?</li>
  <li>Should I not use a Symfony2 form for this, but do it the old fashion way (manually write and process the form)? This works at the moment but it is far from elegant in a Symfony2 environment.</li>
  </ul>
  
  <p>Any help is welcome. Especially a (complete) working code example would be awesome, so I can study it.</p>