Main menu

date

How To: Implement Start and End date fields using regular Drupal 7 Form API

Published by dnovikov on Fri, 10/03/2014 - 15:51

Drupal Date module allows creation of so called "combo" fields in content types, which means you get a combo of "Start date" and "End  date" fields. But what if you want to implement this behavior in your arbitrary form? Well, create two normal "date_popup" fields:

<?php