If you have multiple columns that use the date picker and want to select the same date in subsequent cells, there are issues. If you pop down the date-picker and select the date that's already highlighted, then click off the cell, the value isn't retained. Using the code as it stands, you need to select a different date, then select the date you want, which isn't ideal.
To get around this, you need to add some code to the DataGridView.CellValidating event, to compare the EditedFormattedValue to the FormattedValue, as the EditedFormattedValue has the date set, but this isn't pushed into the FormattedValue if you don't change the date in the datepicker. The following C# code is how I fixed this:
private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
if (dataGridView1.CurrentCell.FormattedValue == "" && dataGridView1.CurrentCell.EditedFormattedValue != "")
{
dataGridView1.CurrentCell.Value = dataGridView1.CurrentCell.EditedFormattedValue;
}
}
Also, if you want to be able to tab through the datagridview date-picker cells, you need to add some more code to do this. The link below contains instructions on how to do this:
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/edb11c36-f1c0-4900-ac33-e3c994a554ab