removed datepicker when it is hidden