Add an enddate to my date field programmatically
Finally found it by changing the field settings' "todate":

'field' =&gt; array(
                'field_name' =&gt; 'field_van_tot',
                'type' =&gt; 'datetime',
                'label' =&gt; $t('From - Until'),
                'cardinality' =&gt; 1,
                'settings' =&gt; array(
                    'granularity' =&gt; array(
                        'year' =&gt; 'year',
                        'month' =&gt; 'month',
                        'day' =&gt; 'day',
                    ),
                    'todate' =&gt; 'required',
                ),
            ),