DateTime input format?
there's something I can't quite get my head around. Just hoping someone
could please help.
I've a WPF TextBox that is bound to a DateTime property, as follows;
<TextBox Text="{Binding DOB, StringFormat='{}{0:dd/MM/yyyy}'}" />
If I enter the text '01/30/2013' it correctly converts and displays it as
'30/01/2013'. If I enter the text '30/01/2013' it throws a validation
error, as it expects the INPUT to be in the format MM/dd/YYYY.
How can I change the input format? I realise I can write a custom
converter. I was just wondering if there was another way?
thanks
No comments:
Post a Comment