Class PropertyDate
Property representing a System.
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public class PropertyDate : PropertyData, IReadOnly<PropertyData>, IReadOnly
Remarks
This class will render a date selector when put in edit mode using the EPiServer.Web.WebControls.Property webcontrol.
Constructors
PropertyDate()
Initializes a new instance of the Property
Declaration
public PropertyDate()
PropertyDate(DateTime)
Initializes a new instance of the Property
Declaration
public PropertyDate(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System. |
date | The initial value. |
Properties
Date
Gets or sets the value as a nullable System.
Declaration
public DateTime? Date { get; set; }
Property Value
Type | Description |
---|---|
System. |
The value as a nullable System. |
MaxValue
Gets the highest value that can be saved.
Declaration
public static DateTime MaxValue { get; }
Property Value
Type | Description |
---|---|
System. |
The highest value that can be saved. |
Remarks
The highest value is currently 9999-12-31.
MinValue
Gets the lowest value that can be saved.
Declaration
public static DateTime MinValue { get; }
Property Value
Type | Description |
---|---|
System. |
The lowest value that can be saved. |
Remarks
The lowest value is currently 1753-01-01.
PropertyValueType
Gets the System.
Declaration
public override Type PropertyValueType { get; }
Property Value
Type | Description |
---|---|
System. |
The System. |
Overrides
Type
Property type as defined by enum Property
Declaration
public override PropertyDataType Type { get; }
Property Value
Type | Description |
---|---|
Property |
The type as defined by enum Property |
Overrides
Value
Gets or sets the value of the property.
Declaration
public override object Value { get; set; }
Property Value
Type | Description |
---|---|
System. |
The value of the property. |
Overrides
Remarks
Value returns null if the property has no value defined.
Methods
IsValidDate(DateTime)
Determines whether [is valid date] [the specified date].
Declaration
public static bool IsValidDate(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System. |
date | The date. |
Returns
Type | Description |
---|---|
System. |
|
Parse(String)
Creates a Property
Declaration
public static PropertyDate Parse(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The string to create a Property |
Returns
Type | Description |
---|---|
Property |
A Property |
Remarks
If the string is null or Empty an empty Property
ParseToObject(String)
A wrapper for System.
Declaration
[Obsolete("ParseToObject is no longer required to be implemented. The same functionality can be achieved by creating a new instance and calling the ParseToSelf method.")]
public override PropertyData ParseToObject(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The string to create a Property |
Returns
Type | Description |
---|---|
Property |
A Property |
Overrides
Remarks
If the string is null or Empty an empty Property
ParseToSelf(String)
Sets the value of the property to the parsed value.
Declaration
public override void ParseToSelf(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The string to create a Property |
Overrides
Remarks
If the string is null or Empty an empty Property
SetDefaultValue()
Sets the default value for this property.
Declaration
protected override void SetDefaultValue()