Browse Source

improved timelines dataSerialization example

codeClimate
Alexander Wunschik 7 years ago
parent
commit
e39dc89cf8
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      examples/timeline/dataHandling/dataSerialization.html

+ 10
- 9
examples/timeline/dataHandling/dataSerialization.html View File

@ -35,12 +35,12 @@
<textarea id="data">
[
{"id": 1, "content": "item 1<br>start", "start": "2014-01-23"},
{"id": 2, "content": "item 2", "start": "2014-01-18"},
{"id": 3, "content": "item 3", "start": "2014-01-21"},
{"id": 4, "content": "item 4", "start": "2014-01-19", "end": "2014-01-24"},
{"id": 5, "content": "item 5", "start": "2014-01-28", "type": "point"},
{"id": 6, "content": "item 6", "start": "2014-01-26"}
{"id": 1, "content": "item 1", "start": "2014-01-01 01:00:00"},
{"id": 2, "content": "item 2", "start": "2014-01-01 02:00:00"},
{"id": 3, "content": "item 3", "start": "2014-01-01 03:00:00"},
{"id": 4, "content": "item 4", "start": "2014-01-01 04:00:00", "end": "2014-01-01 04:30:00"},
{"id": 5, "content": "item 5", "start": "2014-01-01 05:00:00", "type": "point"},
{"id": 6, "content": "item 6", "start": "2014-01-01 06:00:00"}
]
</textarea>
@ -89,9 +89,10 @@
function saveData() {
// get the data from the DataSet
//
// Note that we specify the output type of the fields start and end
// as ISODate, which is safely serializable. Other serializable types
// are Number (unix timestamp) or ASPDate.
// as "ISODate", which is safely serializable. Other serializable types
// are "Number" (unix timestamp), "ASPDate" or "String" (without timezone!).
//
// Alternatively, it is possible to configure the DataSet to convert
// the output automatically to ISODates like:
@ -118,4 +119,4 @@
loadData();
</script>
</body>
</html>
</html>

Loading…
Cancel
Save