mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-03 07:03:33 +02:00
Page:
1.11 Data types
Pages
1.0 Configuration
1.01 Appearance
1.02 Main features
1.03 Grid layout
1.04 Paging
1.05 Drop down filter
1.06 Checklist filter
1.07 Rows counter
1.08 Loading indicator
1.09 Submit and reset button
1.10 Status bar
1.11 Data types
1.12 Themes
1.13 Help instructions
1.14 Popup filters
1.15 No results message
1.16 Highlight keywords
1.17 State
1.18 Mark active columns
1.19 Toolbar
1.20 Single filter
2.0 TableFilter class
2.1 Public properties
2.2 Public methods
3.0 Extensions
3.1 Advanced grid
3.1 Sort
3.2 Column operations
3.3 Filters visibility
3.4 Columns visibility
4. Filter operators
Home
Obsolete
TODO
8
1.11 Data types
koalyptus edited this page 2016-10-09 14:22:29 +11:00
Starting from v0.3.0, the following properties are no longer supported:
col_number_format
col_date_type
default_date_type
col_number_format
and col_date_type
are now merged in a single col_types
option defining the data type of each column.
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
locale | string | defines global locale (default - 'en') |
Locales are now provided by the Sugar Date module, for more information refer to related documentation. |
var tfConfig = { locale: 'en-GB'} |
thousands_separator | string | defines default thousands separator, 2 possible values: '.' or ',' (default - ',') | var tfConfig = { thousands_separator: "." } |
|
decimal_separator | string | defines default decimal separator, 2 possible values: ',' or '.' (default - '.') | var tfConfig = { decimal_separator: "," } |
|
col_types | array | this array defines the data type on a column basis:
|
If you use the `sort` extension it is a good practice to use only the `col_types` option to define the column types for both filtering and sorting capabilities in one single configuration. |
var tfConfig = { col_types: [ 'string', 'number', 'formatted-number', // defaults to '.' for decimal and ',' for thousands { type: 'formatted-number', decimal: ',', thousands: '.' }, 'date', { type: 'date', locale: 'fr' }, { type: 'date', locale: 'en', format: ['{dd}-{months}-{yyyy|yy}'] }, 'ipaddress' ] }; |
Obsolete:
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
default_date_type | string | defines default date type. It accepts the following values: 'DMY', 'MDY', 'YMD', 'DDMMMYYYY' (default - 'DMY') | Supported date types:
|
var tfConfig = { default_date_type: 'MDY'} |
col_number_format | array | this array defines the number format by column, 3 possible values: 'EU', 'US' (decimal and thousands separator differences) and 'IPADDRESS'. The indexes of the array items match the indexes of the columns of the table ( [null,'EU','EU','IPADDRESS'] corresponds to col0, col1, col2, col3) (default - null) | var tfConfig = { col_number_format: [null,'eu','eu', 'ipaddress']
} |
|
col_date_type | array | this array defines the date format by column, 4 possible values: 'DMY', 'MDY', 'YMD', 'DDMMMYYYY' . The indexes of the array items match the indexes of the columns of the table ( [null,'DMY','YMD','DDMMMYYYY' ] corresponds to col0, col1, col2, col3) (default - null) | var tfConfig = { col_date_type: [null,'DMY','YMD','DDMMMYYYY'
] } |