fix dates not working on Safari