New to Telerik UI for WinForms? Start a free 30-day trial

Builds date and time entry nodes from tokens produced for a DateInput.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class DateInput.DateTimeParser

Inheritance: objectDateInput.DateTimeParser

Constructors

Creates a parser that uses the specified input format to determine which date and time fields are present.

C#
public DateTimeParser(DateInput parent)
Parameters:parentDateInput

The date input configuration used to interpret the tokens.

Methods

Parses a token sequence into a date, time, or combined date-time entry.

C#
public DateInput.DateEntry Parse(List<DateInput.Token> inputTokens)
Parameters:inputTokensList<DateInput.Token>

The ordered tokens produced by the date-time lexer.

Returns:

DateInput.DateEntry

An entry that can evaluate the parsed components into a date-time value.

When the sequence contains a time entry, the returned DateInput.DateTimeEntry combines it with the parsed date or an DateInput.EmptyDateEntry. With a time-only format, unrecognized non-empty input can instead produce an DateInput.EmptyDateEntry that evaluates to the supplied starting date.