Skip to main content

DateRangeAttribute Members

Specifies the date range settings.

Constructors

Name Description
DateRangeAttribute() Initializes a new instance of the DateRangeAttribute class with default settings.

Properties

Name Description
ErrorMessage Gets or sets an error message to associate with a validation control if validation fails. Inherited from ValidationAttribute.
ErrorMessageResourceName Gets or sets the error message resource name to use in order to look up the ErrorMessageResourceType property value if validation fails. Inherited from ValidationAttribute.
ErrorMessageResourceType Gets or sets the resource type to use for error-message lookup if validation fails. Inherited from ValidationAttribute.
ErrorMessageString protected Gets the localized validation error message. Inherited from ValidationAttribute.
ErrorTextDaysPlaceholder Gets or sets a value that specifies the text that will be displayed instead of the word ‘days’ in the editor’s error text.
ErrorTextDecadesPlaceholder Gets or sets a value that specifies the text that will be displayed instead of the word ‘decades’ in the editor’s error text.
ErrorTextMonthsPlaceholder Gets or sets a value that specifies the text that will be displayed instead of the word ‘months’ in the editor’s error text.
ErrorTextYearsPlaceholder Gets or sets a value that specifies the text that will be displayed instead of the word ‘years’ in the editor’s error text.
MaxDayCount Gets or sets the maximum number of days in a range.
MaxLength Gets or sets the maximum length of the date range.
MinDayCount Gets or sets the minimum number of days in a range.
MinErrorText Gets or sets the error text to be displayed within the editor’s error frame if the number of selected days is less then the specified minimum value.
MinLength Specifies the minimum length of the date range.
RangeErrorText Gets or sets the error text to be displayed within the editor’s error frame if the number of selected days exceeds the specified range limits.
RequiresValidationContext Gets a value that indicates whether the attribute requires validation context. Inherited from ValidationAttribute.
StartDateEditFieldName Gets or sets the field name of the start-date editor.
TypeId When implemented in a derived class, gets a unique identifier for this Attribute. Inherited from Attribute.

Methods

Name Description
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Returns a value that indicates whether this instance is equal to a specified object. Inherited from Attribute.
FormatErrorMessage(String) Applies formatting to an error message, based on the data field where the error occurred. Inherited from ValidationAttribute.
GetClientValidationRules(ModelMetadata, ControllerContext) Gets client validation rules for that DateRangeAttribute.
GetCustomAttribute(Assembly, Type, Boolean) static Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
GetCustomAttribute(Assembly, Type) static Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttribute(MemberInfo, Type, Boolean) static Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. Inherited from Attribute.
GetCustomAttribute(MemberInfo, Type) static Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttribute(Module, Type, Boolean) static Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
GetCustomAttribute(Module, Type) static Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttribute(ParameterInfo, Type, Boolean) static Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. Inherited from Attribute.
GetCustomAttribute(ParameterInfo, Type) static Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttributes(Assembly, Boolean) static Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and an ignored search option. Inherited from Attribute.
GetCustomAttributes(Assembly, Type, Boolean) static Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
GetCustomAttributes(Assembly, Type) static Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttributes(Assembly) static Retrieves an array of the custom attributes applied to an assembly. A parameter specifies the assembly. Inherited from Attribute.
GetCustomAttributes(MemberInfo, Boolean) static Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. Inherited from Attribute.
GetCustomAttributes(MemberInfo, Type, Boolean) static Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. Inherited from Attribute.
GetCustomAttributes(MemberInfo, Type) static Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttributes(MemberInfo) static Retrieves an array of the custom attributes applied to a member of a type. A parameter specifies the member. Inherited from Attribute.
GetCustomAttributes(Module, Boolean) static Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and an ignored search option. Inherited from Attribute.
GetCustomAttributes(Module, Type, Boolean) static Retrieves an array of the custom attributes applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
GetCustomAttributes(Module, Type) static Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttributes(Module) static Retrieves an array of the custom attributes applied to a module. A parameter specifies the module. Inherited from Attribute.
GetCustomAttributes(ParameterInfo, Boolean) static Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and whether to search ancestors of the method parameter. Inherited from Attribute.
GetCustomAttributes(ParameterInfo, Type, Boolean) static Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. Inherited from Attribute.
GetCustomAttributes(ParameterInfo, Type) static Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. Inherited from Attribute.
GetCustomAttributes(ParameterInfo) static Retrieves an array of the custom attributes applied to a method parameter. A parameter specifies the method parameter. Inherited from Attribute.
GetHashCode() Returns the hash code for this instance. Inherited from Attribute.
GetType() Gets the Type of the current instance. Inherited from Object.
GetValidationResult(Object, ValidationContext) Checks whether the specified value is valid with respect to the current validation attribute. Inherited from ValidationAttribute.
IsDefaultAttribute() When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. Inherited from Attribute.
IsDefined(Assembly, Type, Boolean) static Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
IsDefined(Assembly, Type) static Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. Inherited from Attribute.
IsDefined(MemberInfo, Type, Boolean) static Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. Inherited from Attribute.
IsDefined(MemberInfo, Type) static Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. Inherited from Attribute.
IsDefined(Module, Type, Boolean) static Determines whether any custom attributes are applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. Inherited from Attribute.
IsDefined(Module, Type) static Determines whether any custom attributes of a specified type are applied to a module. Parameters specify the module, and the type of the custom attribute to search for. Inherited from Attribute.
IsDefined(ParameterInfo, Type, Boolean) static Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. Inherited from Attribute.
IsDefined(ParameterInfo, Type) static Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. Inherited from Attribute.
IsValid(Object) Determines whether the specified value of the object is valid. Inherited from ValidationAttribute.
Match(Object) When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. Inherited from Attribute.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) Maps a set of names to a corresponding set of dispatch identifiers. Inherited from Attribute.
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) Retrieves the type information for an object, which can be used to get the type information for an interface. Inherited from Attribute.
_Attribute.GetTypeInfoCount(UInt32) Retrieves the number of type information interfaces that an object provides (either 0 or 1). Inherited from Attribute.
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) Provides access to properties and methods exposed by an object. Inherited from Attribute.
ToString() Returns a string that represents the current object. Inherited from Object.
Validate(Object, ValidationContext) Validates the specified object. Inherited from ValidationAttribute.
Validate(Object, String) Validates the specified object. Inherited from ValidationAttribute.
See Also