#103027
admin
Keymaster

Hi,

Actually, here the issue is different. The data which comes from your data source is String, not a Date object so the format here is ambiguous. From new Date(“01/06/1954”) it will create 6 January 1954. If you pass a Date object instead of String in your data source it will work. In the next version, the dataField will include a formatString property in order to enable deserialization of string dates in the specific formats i.e you will be able to set it like that

` dataSource: new Smart.DataAdapter({
dataSource: [{
“C1”: “1”,
“C2”: “Hot Chocolate”,
“C4””: “SEAVISION”,
“C6”: “01/06/1954”,
“C5”: “true”,
“C3”: “14g”
}],
dataFields:
[

{ name: ‘C1’, dataType: ‘number’ },
{ name: ‘C2’, dataType: ‘string’ },
{ name: ‘C4’, dataType: ‘string’ },
{ name: ‘C5’, dataType: ‘bool’ },
{ name: ‘C3’, dataType: ‘string’ },
{ name: ‘C6’, dataType: ‘date’, formatString: ‘dd/MM/yyyy’ }
]
})`

Best regards,
Peter Stoev

Smart UI Team
https://www.htmlelements.com/