Drupal - Unable to collect end date after field is saved

When I did this, I created a new date field and set it as hidden on the page. I configured it the way I wanted, then duplicated the existing information in the new field, manipulating the database directly. As you will have two date values (..._value and ..._value2) you should begin by setting them the same.

Once you are sure that the correct values are in place, you must then change all your views, rules etc that use the date field to use the new field.

Then set the new field to display and hide the old field. Make sure everything is working before you delete the old field.

There is no short cut that I am aware of. Best to do all this on a copy, with extensive backups. Good luck.


I use a different approach. I:

  • back up my database table for my field, for example field_data_field_event_date. Back up entire database as well for good measure.
  • Delete my field from the field manager (admin/structure/types/manage/yourcontenttype/fields).
  • Add field back with field manager, using exactly the same machine name (field_event_date in my example).
  • set the field settings to allow you to collect an end date.
  • import your field table backup file into the field_data_field_event_date table. This brings back your previous date values.
  • Now try and edit a content item. You should be able to edit the date and provide an end date too.

Tags:

Datetime

7