Class
DateOnlyToDateTimeConverter

Converts between DateOnly and DateTime values.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class DateOnlyToDateTimeConverter : IValueConverter

Inheritance: objectDateOnlyToDateTimeConverter

Implements: IValueConverter

Constructors

DateOnlyToDateTimeConverter()

Declaration

cs-api-definition
public DateOnlyToDateTimeConverter()

Methods

Convert(object, Type, object, CultureInfo)

Converts a DateOnly value to a DateTime.

Declaration

cs-api-definition
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

Parameters

value

object

The DateOnly value to convert.

targetType

Type

The type to convert to.

parameter

object

Additional parameter for the conversion.

culture

CultureInfo

The culture to use for the conversion.

Returns

object

A DateTime with the date from the DateOnly and minimum time, or the original value if not a DateOnly.

ConvertBack(object, Type, object, CultureInfo)

Converts a DateTime value back to a DateOnly.

Declaration

cs-api-definition
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

Parameters

value

object

The DateTime value to convert back.

targetType

Type

The type to convert back to.

parameter

object

Additional parameter for the conversion.

culture

CultureInfo

The culture to use for the conversion.

Returns

object

A DateOnly with the date part from the DateTime, or the original value if not a DateTime.