opening and closing datepicker