Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • How to coerce Date values for client-only DataSource

    When using static data for a ListGrid, with DataSource that is clientOnly:true
    enter image description here
    Given static data where the date field is not a js Date it will display list this

    Is it possible to get the DataSource to automatically coerce the string date into js Date?

    Here is an example

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	5.3 KB
ID:	256842

  • Isomorphic
    replied
    A RestDataSource with dataFormat:"json" would parse that for you if the field was declared as datetime and the data was requested by that DataSource. Outside of that, if you already have it in memory, there's not really an approach that's going to be quicker than the obvious for loop to get the data in the right format before providing it to the DataSource.

    Leave a comment:

Working...
X