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.
Move all parsing to its own class
Merge pull request #77 from kplaakso/master

Fix parsing localized input fields