Fix parsing localized input fields

Previously the parse method did not take locale into
account, though it was sometimes called with it.
The value in the input field is now parsed in the
same format it is written. The parser handles only
dates, not times, since the write formats are only
for dates.