Configure datetimepicker only when datetime field is present.

This avoids setting wrong due dates.