1

I need set the start date (e.g. now +1) for my date field. How can I do this on Drupal 8.1.x?

2 Answers 2

3

When you create your field, you have the option of setting a default value. Set the Default Value to Relative Date and then ender "+1 day" into the textfield, and proceed with setting up the field.

When you create new entities with that field, it will default to the current time +1 day, which you can then change if needed.

1

The core date field doesn't support a start and end date, it's a single value field. See this discussion for the nitty-gritty for when the field was originally added, and the current issue about adding end-date support.

Date 'range' fields, with the option for a start/end date, are supported by the contributed Date module. Though the D8 version is still in dev so YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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