DateType
The DataType for date values. Stores a value of seconds since January 1st 1970.
Allowed options:
| Name | Type | Attribute | Description |
|---|---|---|---|
| dateType | string |
|
Whether to handle just a date, time or both. 'date' | 'time' | 'datetime' |
Static Member Summary
| Static Public Members | ||
| public static |
typeName: * |
|
Method Summary
| Public Methods | ||
| public |
Converts between strings, JS Date objects, moment objects, or unix time values. |
|
| public |
filter(filterValue: *, rowValue: *): * this method was deprecated. Filtering will be refactored to its own module.
|
|
| public |
this method was deprecated. Will be moved to ViewType
|
|
| public |
getDisplay(value: *): * this method was deprecated. Will be moved to view types.
|
|
| public |
getFormat(): * this method was deprecated. Will be moved to ViewType
|
|
| public |
getType(): * |
|
| public |
getValue(value: *): * See DataType#getValue. |
|
| public |
Checks if the passed in value holds a valid date value. |
|
Inherited Summary
| From class Type | ||
| public static |
typeName: * The type name. |
|
| public static |
Parses a JS or Immutable.js object into a type. |
|
| public static |
parseOneOrMany(parseField: func): oneOrManyParser Creates a one or many parser with the passed in field parser. |
|
| public static |
parseOptions(field: Immutable.Map, parseField: function): Immutable.Map Override this function if you want the type to reference other types. |
|
| From class DataType | ||
| public static |
typeName: * The data type name. |
|
| public static |
parse(field: *, parseField: *): * |
|
| public |
name: * |
|
| public |
options: * |
|
| public |
|
|
| public |
filter(filterValue: *, rowValue: *): * |
|
| public |
getDefaultValue(defaultValue: undefined): * |
|
| public |
getDisplay(value: *): string Returns the value parsed for human consumption. |
|
| public |
getField(ref: *): * |
|
| public |
getFieldAndValue(value: *, ref: *): {"field": *, "value": *} |
|
| public |
getName(): * |
|
| public |
getOptions(): * |
|
| public |
getValidationLinks(): * |
|
| public |
getValidator(): * |
|
| public |
getValue(value: *, defaultValue: *): * Returns a parsed value. |
|
| public |
Checks if the passed in value is "not empty". |
|
| public |
isExcluded(): * |
|
| public |
isGenerated(): * |
|
| public |
isRequired(): * |
|
| public |
isUnique(): * |
|
| public |
validate(value: *, callback: *): * Validates that the given value follows the rules of the data type. |
|
Static Public Members
public static typeName: * source
The data type name. This must be overridden.
Override:
DataType#typeNamePublic Methods
public convert(value: string | Date | moment | number, toType: string): string | moment | number source
Converts between strings, JS Date objects, moment objects, or unix time values.
public filter(filterValue: *, rowValue: *): * source
Override:
DataType#filterParams:
| Name | Type | Attribute | Description |
| filterValue | * | ||
| rowValue | * |
Return:
| * |
public getDisplay(value: *): * source
Returns the value parsed for human consumption.
Override:
DataType#getDisplayParams:
| Name | Type | Attribute | Description |
| value | * |
Return:
| * |
public getValue(value: *): * source
See DataType#getValue.
Override:
DataType#getValueParams:
| Name | Type | Attribute | Description |
| value | * |
Return:
| * |
public hasValue(value: any): boolean source
Checks if the passed in value holds a valid date value.
Override:
DataType#hasValueParams:
| Name | Type | Attribute | Description |
| value | any | The date value |