Fixed date input so it works correctly.