changed datepicker startup function