Skip to content

Commit

Permalink
Merge pull request #702 from marmelab/format_doc
Browse files Browse the repository at this point in the history
[RFR] Add doc on input date requirement for format
  • Loading branch information
fzaninotto committed Sep 23, 2015
2 parents 3fa4221 + 5f3c898 commit 9ebc515
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/Configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,21 @@ Enable HTML sanitization of WYSIWYG Editor value (removal of script tags, etc).

* `format(string ['yyyy-MM-dd' by default])`

This method uses the Angular `date` filter. Thus, as explained in the [Angular documentation](https://docs.angularjs.org/api/ng/filter/date), input date should be in a normalized format:

> Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
* `parse(function [remove hours, minutes and timezone by default])`
Filter applied to modify date object returned by date picker if needed.

### `datetime` Field Type

* `format(string ['yyyy-MM-dd HH:mm:ss' by default])`

This method uses the Angular `date` filter. Thus, as explained in the [Angular documentation](https://docs.angularjs.org/api/ng/filter/date), input date should be in a normalized format:

> Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
* `parse(function [no change by default])`
Filter applied to modify date object returned by date picker if needed.

Expand Down

0 comments on commit 9ebc515

Please sign in to comment.