I'm building an C# application using WPF/MVVM and I have some trouble using a DateTime in a DataGrid.
The column is defined as
<DataGridTextColumn Header="Start" Binding="{Binding StartDate, StringFormat=dd-MM-yyyy}" />
The code works fine with a date like 05-08-2011, which has a leading zero. But, when I try to enter a date without the leading zero (like 15-08-2011) the field won't validate. Why is that?
StartDate is of type DateTime.