You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/config/date_format.md
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,9 @@ If you want to use a custom format, you can either change this config, or redefi
30
30
31
31
## Loading dates in ISO format
32
32
33
-
Since v9.1.3, Gantt automatically detects and parses ISO 8601 date strings. The `date_format` config is not needed for ISO strings - they are recognized and parsed directly.
33
+
Since v9.1.3, Gantt automatically detects and parses ISO 8601 date strings. The `date_format` config is not needed for ISO strings - they are recognized and parsed directly.
34
34
35
-
Supported ISO 8601 patterns:
36
-
37
-
-`2026-01-06` - date only
38
-
-`2026-01-06T10:30:45` - date and time
39
-
-`2026-01-06T10:30:45.123` - date and time with milliseconds
40
-
-`2026-01-06T10:30:45.000Z` - UTC
41
-
-`2026-01-06T10:30:45+02:00` - with timezone offset
35
+
When ISO dates are detected on input, they are serialized back as ISO strings automatically when passed to the [DataProcessor](guides/server-side.md). Date-only strings (e.g., `"2026-01-06"`) are serialized back as date-only strings, preserving the original format.
42
36
43
37
The `date_format` config still applies to non-ISO date strings.
44
38
@@ -63,8 +57,8 @@ For more details, see [Loading dates in ISO format](guides/loading.md#loading-da
63
57
If you need to change the date format dynamically, it is necessary to modify the [parse_date](api/template/parse_date.md) template in the following way:
64
58
65
59
~~~js
66
-
var cfg =gantt.config;
67
-
var strToDate =gantt.date.str_to_date(cfg.date_format, cfg.server_utc);
0 commit comments