refactoring js
dateinput fixed
required fields and date input fixed