enforce min and max date in custom date range if it exists