Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Edited Issue: Masked DateTimePicker [22326]

$
0
0
I changed the DateTimePicker template using MaskedTextBox and it does not work properly. The position of the caret is changed when I try to enter a date.
How can I fix this?
Comments: ** Comment from web user: BoucherS **

Hi,

This will be fixed in v3.2.
In the meantime, you can go in file Xceed.Wpf.Toolkit/Primitives/DateTimeUpDownBase.cs,
in method PerformMouseSelection(),
and replace its content with ;
```
var dateTimeInfo = this.GetDateTimeInfo( TextBox.SelectionStart );
if( (dateTimeInfo != null) && (dateTimeInfo.Type == DateTimePart.Other) )
{
this.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action( () =>
{
// Select the next dateTime part
this.Select( this.GetDateTimeInfo( dateTimeInfo.StartPosition + dateTimeInfo.Length ) );
}
) );
return;
}

this.Select( dateTimeInfo );
```


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>