Tried to fix browser problem setting current date for date-fields in javascript