datepicker changes and add submit button function and some other stuff