Class DateTimePropertyEditorBase
Provides base functionality for date time property editors that store their value as a JSON string with timezone information.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class DateTimePropertyEditorBase : DataEditor, IDataEditor, IDiscoverable
Constructors
View SourceDateTimePropertyEditorBase(IDataValueEditorFactory, IIOHelper, IPropertyIndexValueFactory)
Initializes a new instance of the DateTimePropertyEditorBase class.
Declaration
protected DateTimePropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory, IIOHelper ioHelper, IPropertyIndexValueFactory propertyIndexValueFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataValueEditorFactory | dataValueEditorFactory | |
| IIOHelper | ioHelper | |
| IPropertyIndexValueFactory | propertyIndexValueFactory |
Properties
View SourcePropertyIndexValueFactory
Gets the index value factory for the editor.
Declaration
public override IPropertyIndexValueFactory PropertyIndexValueFactory { get; }
Property Value
| Type | Description |
|---|---|
| IPropertyIndexValueFactory |
Methods
View SourceCreateConfigurationEditor()
Creates a configuration editor instance.
Declaration
protected override IConfigurationEditor CreateConfigurationEditor()
Returns
| Type | Description |
|---|---|
| IConfigurationEditor |
CreateValueEditor()
Creates a value editor instance.
Declaration
protected override IDataValueEditor CreateValueEditor()
Returns
| Type | Description |
|---|---|
| IDataValueEditor |
MapDateToEditorFormat(DateTimeDto)
Converts the specified date and time value to a string formatted for use in the property editor.
Declaration
protected abstract string MapDateToEditorFormat(DateTimeValueConverterBase.DateTimeDto dateTimeDto)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeValueConverterBase.DateTimeDto | dateTimeDto | An object containing the date and time components to be formatted. |
Returns
| Type | Description |
|---|---|
| string | A string representation of the date and time, formatted for use in the property editor. |