Add js to instansiate datepickers
Fix add missing return to function