RadMaskedDateTimeInput control not displaying value properly

3 posts, 1 answers
  1. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 06 Nov 2012 Link to this post

    I've got a RadMaskedDateTimeInput control in my application:
    <telerik:RadMaskedDateTimeInput BorderBrush="{Binding Path=BorderBrush, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            FlowDirection="{Binding Path=FlowDirection, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            Focusable="True"
                                            FontFamily="{Binding Path=FontFamily, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            FontSize="{Binding Path=FontSize, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            FontStretch="{Binding Path=FontStretch, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            FontStyle="{Binding Path=FontStyle, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            FontWeight="{Binding Path=FontWeight, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            GotFocus="ValueBox_GotFocus"
                                            Grid.Column="0"
                                            FormatString="{Binding Path=Mask, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            HorizontalAlignment="Stretch"
                                            HorizontalContentAlignment="Right"
                                            InputBehavior="Insert"
                                            IsClearButtonVisible="False"
                                            LostFocus="ValueBox_LostFocus"
                                            Margin="5"
                                            Mask="{Binding Path=Mask, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            Name="ValueBox"
                                            SelectionOnFocus="CaretToEnd"
                                            SpinMode="PositionAndValue"
                                            TabIndex="{Binding Path=TabIndex, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}}"
                                            TextMode="MaskedText"
                                            UpdateValueEvent="PropertyChanged"
                                            Value="{Binding Converter={StaticResource TimeSpanConverter}, Path=Value, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type cs:TimeSpanSpinner}}, UpdateSourceTrigger=PropertyChanged}"
                                            VerticalAlignment="Center" />

    This is actually inside of a UserControl.  That user control is then used in another UserControl that is used to edit user settings.  The first UserControl is supposed to provide spinner functionality for specifying a time out interval on a touch screen computer.  There are two big buttons next to the RadMaskedDateTimeInput control, one for increasing the value and one for decreasing it.  Since the value is a time out, the data type of the variable being edited is TimeSpan, and I want to see the text formatted as HH:mm:ss.fff.  That's what the Mask property is set to, and the FormatString is set to that, too.

    The control displays correctly until I put the cursor in it.  At that point, the HH:mm:ss.fff formatting goes away and I see 01/01/0001.  This is useless.  This did work properly at one time, but now it's broken and I don't know why.  Why is the control ignoring the input mask???

    I'm using the 2012 Q1 version of the library.
  2. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 08 Nov 2012 Link to this post

    Hello Tony,

    I tried to reproduce your issue with our latest release and it seems that the code works as expected (see the attached project). Can you please upgrade your version and try to reproduce it after that?

    All the best,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 07 Dec 2012 Link to this post

    Upgrading to the most recent version of the library did fix this issue.

    Thanks!
Back to Top