Editor: render a datetime field for display
Editor: render a datetime field for display

Long story short, I have data coming back from the server with a full-on Datetime "YYYY-MM-DDTHH:mm:ss".
I followed some articles to get it displayed correctly in Datatables by adding these srcipts, and using the renderer:
<script src="../javascript/moment.min-2.22.2.js"></script>
<script src="../assets/DataTables-1.10.18/Plugins/dataRender/datetime.js"></script>
columns: [
{
data: 'EffectDate',
title: 'Effective Date',
render: $.fn.dataTable.render.moment("YYYY-MM-DDTHH:mm:ss", "MM-DD-YYYY"),
},
OK, so here's the question:
How do I do this in DT Editor?
I tried to use the same renderer, but it had no effect. I will also want the Editor calendar to pop-up, just FYI.
fields: [
{
label: "Effective Date:",
name: "EffectDate",
type: "datetime",
format: 'MM-DD-YYYY',
render: $.fn.dataTable.render.moment("YYYY-MM-DDTHH:mm:ss", "MM-DD-YYYY")
},
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Editor doesn't have a rendering function in the same way DataTables does I'm afraid. It assumes that you will want to edit in the format that the data is given to it as.
So in this case there are two options:
Allan