JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Date Column Format › Reply To: Date Column Format
November 9, 2021 at 3:16 pm
#102527
Participant
Hi Matias Galante,
For this purpose you can use the formatFunction
property of the column like in the following code snippet to achieve the functionality that you need:
{ label: 'Time of Purchase', dataField: 'timeOfPurchase', width: 500,
formatFunction: function(settings) {
const formatedDate = new Smart.Utilities.DateTime(settings.value).toString('MM/dd/yyyy ');
settings.template= <code><div> ${formatedDate}</div></code>
}
},
Let me know if that works for you!
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/