Click here to Skip to main content
15,881,381 members
Articles / Desktop Programming / WPF

I got this error string was not recognized as a valid datetime when I validate WPF DatePicker control

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
10 Nov 2012CPOL 4K  
I have a WPF application, with a WPF Toolkit DatePicker control bound to a DateTime variable as following:<myToolkit:DatePicker Grid.Row="4" Grid.Column="4" x:Name="clndrHiredate" HorizontalAlignment="Left" Height="20" Width="150" VerticalAlignment="Top" FontFamily="Tahoma"...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
10 Nov 2012Issam Ali
You can not bind to private field; you need public property (notifying property or a dependency property) to bind to it. Here is my suggestion and I hope it may help youDeclare new dependency property in the Window class like this:public DateTime BindingDate{ get { return...
Please Sign up or sign in to vote.
11 Nov 2012Doudy_2020
I solved this like that: Width="150" VerticalAlignment="Top" FontFamily="Tahoma" FontWeight="Light"...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Egypt Egypt
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions