DatePicker - how change binding data?

Oct 29, 2008 at 12:41 PM
Hi! I wrote code in XAML (HireDate field in data)
 <dp:DatePicker  SelectedDate="{Binding HireDate}" SelectedDateFormat="Short" />
it code view date, but choice new date in control  DatePicker  don't persist in field "HireDate" How binding DatePicker  with date?
I am sorry my bad Engleash :-)

Oct 29, 2008 at 1:39 PM
In article DataGrid Feature
example, a date column is created using the new DatePicker control as the CellEditingTemplate:
    <dg:DataGridTemplateColumn Header="Date" MinWidth="100">
        <dg:DataGridTemplateColumn.CellEditingTemplate>
            <DataTemplate>
                <dg:DatePicker SelectedDate="{Binding Date}" SelectedDateFormat="Short" />
            </DataTemplate>
        </dg:DataGridTemplateColumn.CellEditingTemplate>
        <dg:DataGridTemplateColumn.CellTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Date, StringFormat=d}" />
            </DataTemplate>
        </dg:DataGridTemplateColumn.CellTemplate>
    </dg:DataGridTemplateColumn>
    
In with case new date don't save in field "date"!!!

Oct 29, 2008 at 2:13 PM
Сorrect ansver!!!

 <dg:DatePicker SelectedDate="{Binding Path=BirthDay, Mode=TwoWay}" SelectedDateFormat="Short" />!