I've succeeded creating a simple date_popup field with the following code :

$form['date_start'] = array(
  '#type' => 'date_popup',
  '#title' => t('Start date'),
  '#default_value' => '',
  '#date_format' => 'Y-m-d',

Now, is there any way to directly create the "End date" field without having to create a second field declaration ? Is there any bundled widget I can use ? I've seen something about date_combo but I'm not sure to understand it well.

Thanks for help !


there is no way to do it with the standard field widgets, you have to craft your own, the examples module may help you


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.