Moving date picker to the js file and not keep it in base template