Fixed parsing of date input.