Date Range Picker: refactored code