Changed functionality of DatePicker to act as a member variable