Delete duplicated datepicker code