Use domain for date constraint on period
Instead of always compute the date from the period, we compute the other value from the changed field. The start date of the period is used for period in the future and the end date for period in the past.
Closes #12084 (closed)