2

I need to make a content type with a Start Date and an End Date. I know that I can handle this in two ways:

  1. Have two separate field
  2. Have one field with a option of "collect an end date".

I wonder when I should choose either of these options. I assume that the second option is for representing an Event in a Calendar. But if I don't need this, is the first option then the best?

EDIT:

If you plan use the "collect an end date" option you need read this:

How to use the Time ago view formatter when you have an end date collected in your date field?

Because you can have problems with the Views module and the Time ago view formatter.

  • 1
    @Pierre.Vriens Because maybe somebody is in a early stage of his project and don't want use the patch. It just a warning, I edit now – Adrian Cid Almaguer Feb 1 '16 at 22:30
4

Why having two fields if one will be enough to serve the purpose?

Your question itself states that you need a "Start Date and End Date" so I think option 2 will be better, as it's simpler and could perfectly solve the problem you are facing. Also, the Date module is highly flexible, so displaying your dates in different formats will be easy enough.

On the other hand, only reason that comes to my mind for having 2 separate fields could be for re-usability, for example, if you wanted to reuse only one of your fields in another content type.

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.