This project has moved and is read-only. For the latest updates, please go here.

DateTimePicker (Editing date by keyboard)

May 12, 2011 at 9:17 AM


I have found a problem whit this control when I try to change the date in the field with the keyboard, the control doesn`t accept the new value and reset to previous value. So I`m able to change the value of DateTimePicker only by scroling by mouse or by selecting on the calendar picker.

The ability of changing the value by keyboard is very importaint. Try to fix it.


May 12, 2011 at 2:22 PM

Can you be more specific?  Can you provide the XAML and code?  What .NET Version are you using?  What version of the toolkit are you using?   What culture is being used?

May 12, 2011 at 2:57 PM
Edited May 12, 2011 at 2:58 PM

I set the Format="Custom" and FormatString="dd.MM.yyyy HH:mm";

I work in MS Visual Studio 2010 Professional, .NET Framework ver. 4.0.30319;

toolkit ver. 72732

Culture is set by default [Ru-ru]

Try to change the value in the DateTimePicker control not by using the mouse scroll but using the keyboard number buttons and then pres enter or move focus from this control? and you will see that control doesn't accept new value and returned to value that was set before you start changing it.

May 12, 2011 at 3:09 PM

It is working for me using the latest source code.  Please download the latest source code and try it.  I made a fix yesterday that may also fix this.

May 12, 2011 at 3:41 PM

Thank you very much.

The control now works fine.

Sep 28, 2011 at 3:59 PM

I'm working with version 1.5 - this behavior seems to be broken again.  Has anyone else seen this recently?

Sep 28, 2011 at 4:09 PM

No, it still works.  Can you provide your culture and XAML?

Sep 28, 2011 at 4:36 PM

I went back to the samples to check, and added a DateTimePicker to the HomeView.xaml file in the DateTime sampel module.  My culture in en-US (the default).  here's the XAML:

<infControls:DemoView x:Class="Samples.Modules.DateTime.Views.HomeView"
                      Title="DateTime Controls">
            FormatString="ddMMMyyyy HH:mm"
I select the minutes (for example) and change the value, hit Enter, and the old value returns.
Sep 28, 2011 at 4:39 PM

This is because there is no date separators in your format.  Without a date separator the parser cannot correctly parse the date.

Sep 28, 2011 at 4:50 PM

Duh - sorry about that.  I didn't even see the periods in the original poster's XAML.  Sucks to get old ;-)

Nov 8, 2011 at 6:00 PM
Edited Nov 8, 2011 at 7:35 PM

I have a similar problem. When i change the culture to es-MX and i try edit the time, when lost focus or hit enter, the old value return. The problem occurs when add "tt" in the format string, only works for en-US.

Nov 9, 2011 at 2:46 PM

can you provide your XAML?

Nov 11, 2011 at 12:06 PM

I had similar problems some time ago 

Using the mask: MM/dd/yyyy HH:mm

Culture is set by default [pt-br]

Do not enter values ​​accepted between 12:00 and 23:59 hours. Only by using the spin ..

Jan 12, 2012 at 12:35 PM

Same issue with 1.5. I use format string "G" and [ka-GE] as culture(G is dd.MM.yyyy HH:mm:ss for ka-GE). Spin is not working, cant change date with keyboard. If i change manually format string to "dd.MM.yyyy HH:mm:ss" then everything works just fine.

Jan 12, 2012 at 8:37 PM

Try the lower case "g".