I have timestamp(String) value. Can I use DateField with timestamp?
<DateField source="createdAt" showTime /> // createAt: timeStamp(String)
Cast your timestamp to an integer, e.g. using a custom component:
const DateFieldForTimestamp = props => {
const recordWithTimestampAsInteger = {
[props.source]: parseInt(props.record[props.source], 10)
};
return <DataField {...props} record={recordWithTimestampAsInteger} />
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With