Eliminate if condition on date selectors