Maybe its not a bug but here is an example when it has bad visual experience: you have Value property of DateTimePicker bound to property in data context which is initially unset i.e. 1 Jan 0001. When you change the value of the property the date displayed is correct but when you open calendar you'll see Jan 0001 and you have fun time moving to something closer to present time
Comments: ** Comment from web user: jcCodePlex59 **
The date in the table looks like this: 9/27/2014 12:30:00 PM and the datetimepicker textbox shows the correct value based on the row chosen.
I created a streamlined version of the code & ran it - it has the same problem:
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data.OleDb;
using System.Data;
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
}
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
string AccessConString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:databasename.accdb;Persist Security Info=False;";
System.Data.DataSet DS;
OleDbConnection CN;
OleDbDataAdapter DA;
OleDbConnection myCon;
CN = new System.Data.OleDb.OleDbConnection(AccessConString);
DA = new System.Data.OleDb.OleDbDataAdapter();
DS = new DataSet();
myCon = new OleDbConnection(AccessConString);
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select EndTime from TableName order by endtime desc";
cmd.Connection = myCon;
myCon.Open();
DA = new OleDbDataAdapter(cmd);
DS = new DataSet();
try
{
DA.Fill(DS);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
myCon.Close();
this.DataContext = DS.Tables[0].DefaultView;
}
}
}
and...
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
xmlns:xceed="http://schemas.xceed.com/wpf/xaml/toolkit">
<Grid>
<StackPanel>
<xceed:DateTimePicker Name="dtpEndTime" Value="{Binding EndTime}" Format="Custom" FormatString="dddd, MMMM, dd, yyyy" Grid.Row="1" Grid.Column="1" ></xceed:DateTimePicker>
</StackPanel>
</Grid>
</Window>
```
I used an Access db - you only need one field (EndTime) in one table (TableName ) to get this to work.
Thank you for looking into this!