Completed
Last Updated: 09 Jun 2022 14:35 by ADMIN
Release LIB 2022.2.613 (13 June 2022)
Stenly
Created on: 31 May 2022 12:23
Category: DateTimePicker
Type: Bug Report
1
DateTimePicker: Milliseconds are not correctly parsed

The milliseconds are not correctly parsed when setting an (f) custom format to the ShortTimePattern property.

A workaround for this would be to implement custom parsing:

private void TimePicker_ParseDateTimeValue(object sender, Telerik.Windows.Controls.ParseDateTimeEventArgs args)
{
    string input = args.TextToParse;

    DateTime res;
    bool isValueParsedSuccessfully = DateTime.TryParse(input, out res);

    if (isValueParsedSuccessfully)
    {
        args.Result = res;
    }
    else
    {
        args.IsParsingSuccessful = false;
    }
}

 

0 comments