Class: DateColumn

FooTable. DateColumn

new DateColumn(instance, definition) → {FooTable.DateColumn}

The date column class is used to handle date values. This column is dependent on moment.js to provide date parsing and formatting functionality.
Parameters:
Name Type Description
instance FooTable.Table The parent FooTable.Table this column belongs to.
definition object An object containing all the properties to set for the column.
Returns:
Type
FooTable.DateColumn

Extends

Members

<readonly> $el :jQuery

The jQuery cell object for the column header.
Type:
Inherited From:

classes :Array.<string>

The classes to apply to all cells in this column.
Type:
  • Array.<string>
Inherited From:

formatString :string

The format string to use when parsing and formatting dates.
Type:
  • string

<readonly> ft :FooTable.Table

The root FooTable.Table for the column.
Type:
Inherited From:

hidden :boolean

Whether or not this column is hidden from view and appears in the details row.
Type:
  • boolean
Inherited From:
Default Value:
  • false

<readonly> index :number

The index of the column in the table. This is set by the plugin during initialization.
Type:
  • number
Inherited From:
Default Value:
  • -1

<readonly> internal :boolean

Internal columns or there cells will not be returned when calling methods such as `FooTable.Row#val`.
Type:
  • boolean
Inherited From:

name :string

The name of the column. This name must correspond to the property name of the JSON row data.
Type:
  • string
Inherited From:
Default Value:
  • null

style :object

The styles to apply to all cells in this column.
Type:
  • object
Inherited From:

title :string

The title to display in the column header, this can be HTML.
Type:
  • string
Inherited From:
Default Value:
  • null

<readonly> type :string

The type of data displayed by the column.
Type:
  • string
Inherited From:

<readonly> virtual :boolean

Whether or not the column was parsed from a standard table row containing data instead of from an actual header row.
Type:
  • boolean
Inherited From:

visible :boolean

Whether or not this column is completely hidden from view and will not appear in the details row.
Type:
  • boolean
Inherited From:
Default Value:
  • true

Methods

<static> filterValue(valueOrElement) → {string}

This is supplied either the cell value or jQuery object to parse. A string value must be returned from this method and will be used during filtering operations.
This:
Parameters:
Name Type Description
valueOrElement * | jQuery The value or jQuery cell object.
Returns:
Type
string

<protected> $create()

After the column has been defined this ensures that the $el property is a jQuery object by either creating or updating the current value.
This:
Inherited From:

<protected> createCell(row) → {FooTable.Cell}

Creates a cell for this column from the supplied FooTable.Row object. This allows different column types to return different types of cells.
This:
Parameters:
Name Type Description
row FooTable.Row The row to create the cell from.
Inherited From:
Returns:
Type
FooTable.Cell

<protected> define(definition)

This is supplied the column definition in the form of a simple object created by merging options supplied via the plugin constructor with those parsed from the DOM.
This:
Parameters:
Name Type Description
definition object The object containing the column definition.
Inherited From:

<protected> formatter(value, options, rowData) → {string|HTMLElement|jQuery}

This is supplied the value retrieved from the FooTable.DateColumn#parser function and must return a string, HTMLElement or jQuery object. The return value from this function is what is displayed in the cell in the table.
This:
Parameters:
Name Type Description
value * The value to format.
options object The current plugin options.
rowData object An object containing the current row data.
Returns:
Type
string | HTMLElement | jQuery

<protected> parser(valueOrElement) → {moment|null}

This is supplied either the cell value or jQuery object to parse. Any value can be returned from this method and will be provided to the FooTable.DateColumn#format function to generate the cell contents.
This:
Parameters:
Name Type Description
valueOrElement * | jQuery The value or jQuery cell object.
Returns:
Type
moment | null

stringify() → {string}

Return the supplied value as a string.

Inherited From:
Returns:
Type
string
Copyright © 2016
Documentation generated by JSDoc 3.4.1 on 2017-07-06T21:37:42+02:00