started logic for date picker