Date module: detect if an end date was set I have a content type with a date field. It is setup to collect an end date (optional). The field type is Date (UNIX timestamp).

The field is to store "experience" as (from) January 2011 - (to) March 2012.

If I don't check the "show end date" when creating content, the end date is the same than the start date. But in my case, I sometimes need to collect an end date that would be the same than the start date (January 2011 - January 2011).

So how do I know if that "show end date" checkbox was checked?

Right now here is what I get when the end date is the same than the start date:

value (String, 10 characters ) 1443650400
value2 (String, 10 characters ) 1443650400


And this is what I get when the "show end date" was not checked:

value (String, 10 characters ) 1443650400
value2 (String, 10 characters ) 1443650400
I'm going to take a guess and assume you have the end-date defaulting to the start-date in the Date field, field-settings?



That way if they click the checkbox for Show End Date, they have to provide a value for it. otherwise it will be empty; essentially letting you know if the checkbox was checked or not.