DateType
Extends:
Wrapper for Sugar Date module providing datetime helpers and locales
Constructor Summary
Public Constructor | ||
public |
constructor(tf: TableFilter) Creates an instance of DateType |
Member Summary
Public Members | ||
public |
Sugar Date instance |
|
public |
|
|
public |
Global locale |
Method Summary
Public Methods | ||
public |
addConfigFormats(types: Array) Add date time format(s) to a locale as specified by the passed collection of column types, ie: [ 'string', 'number', { type: 'date', locale: 'en', format: ['{dd}/{MM}/{yyyy}']} ] |
|
public |
destroy() Remove DateType instance |
|
public |
Return the locale code for supplied column index as per configuration or global setting |
|
public |
getOptions(colIndex: Number, types: Array): Object Return the type object of a specified column as per configuration or passed collection |
|
public |
init() Initialize DateType instance |
|
public |
Check string representation of a date for a specified locale is valid |
|
public |
Parse a string representation of a date for a specified locale and return a date object |
Inherited Summary
From class Feature | ||
public |
TableFilter configuration |
|
public |
TableFilter emitter instance |
|
public |
TableFilter feature setting |
|
public |
Feature name is the camelised class name as per TableFilter's convention |
|
public |
Field indicating whether Feature is initialized |
|
public |
TableFilter instance |
|
public |
destroy() Destroy the feature |
|
public |
disable() Disable the feature |
|
public |
enable() Enable the feature |
|
public |
init() Initialize the feature |
|
public |
Indicate whether the feature is enabled or not |
|
public |
reset() Reset the feature after being disabled |
Public Constructors
public constructor(tf: TableFilter) source
Creates an instance of DateType
Override:
Feature#constructorParams:
Name | Type | Attribute | Description |
tf | TableFilter | TableFilter instance |
Public Members
public initialized: boolean source
Field indicating whether Feature is initialized
Override:
Feature#initializedPublic Methods
public addConfigFormats(types: Array) source
Add date time format(s) to a locale as specified by the passed collection of column types, ie: [ 'string', 'number', { type: 'date', locale: 'en', format: ['{dd}/{MM}/{yyyy}']} ]
Params:
Name | Type | Attribute | Description |
types | Array |
|
Collection of column types |
public getLocale(colIndex: Number): String source
Return the locale code for supplied column index as per configuration or global setting
Params:
Name | Type | Attribute | Description |
colIndex | Number | Column index |
public getOptions(colIndex: Number, types: Array): Object source
Return the type object of a specified column as per configuration or passed collection