Vuetiful is a component framework written on top of the Vue reactive library. It is primarily designed for creating business/administration applications where the displaying of data is paramount.
First of all, thanks for your great effort to give us an easy to use vue.js featured enought grid.
I have a problem using templated column bound to a Date property.
It seems that the sort option does not works.
Here's the sample of html code :
`<datatable id="data-table-main"
:source="quartzJobs.rows"
:striped="quartzJobs.striped"
:editable="quartzJobs.editable"
:line-numbers="quartzJobs.lineNumbers">
Hi,
First of all, thanks for your great effort to give us an easy to use vue.js featured enought grid. I have a problem using templated column bound to a Date property. It seems that the sort option does not works.
Here's the sample of html code : `<datatable id="data-table-main" :source="quartzJobs.rows" :striped="quartzJobs.striped" :editable="quartzJobs.editable" :line-numbers="quartzJobs.lineNumbers">
And here's the Vue object declaration in my js file :
new Vue({ el: "#datatables", data: function () { return { quartzJobs: quartzJobs, currencies: currencies, aggregators: aggregators, dateFormats: [ "DD/MM/YYYY", "DD MMM YYYY", "D MMMM YYYY", "D/MM/YYYY h:mm a" ], formatters: [ { id: "C", name: "Currency" }, { id: "DT", name: "Date and Time" } ] }; }, computed: { selectAll: { get: function () { return quartzJobs.selected.length == customers.rows.length; }, set: function (value) { quartzJobs.selected = value ? customers.rows : []; } } }, methods: { getLastRunDurationString: function (jobId) { var qzJob = $linq(quartzJobs.rows).where("item => item.JobId == " + jobId + "").singleOrDefault(); if (qzJob.Triggers.length > 0) { var lastExecutedTriger = $linq(qzJob.Triggers).orderByDescending(function (trig) { return trig.PreviousRunTime }).first(); var lastRunBeginTime = moment(lastExecutedTriger.LastRunBeginTime); var lastRunEndTime = moment(lastExecutedTriger.LastRunEndTime); if (lastRunBeginTime < lastRunEndTime) { var duration = moment.duration(lastRunEndTime.diff(lastRunBeginTime)); return duration.format("HH:mm:ss.S", { trim: false }); } else { return "N/A"; } } else { return "N/A"; } } }, filters: { // filter that allow to get a formatted string corresponding to the specified date formatDate: function (value) { if (typeof value !== 'undefined') { return value == "" ? "N/A" : formatters.datetime(value, "DD/MM/YYYY HH:mm"); //return moment(value).utc().format(); //return moment(String(value)).format('DD/MM/YYYY HH:mm');//'DD/MM/YYYY HH:mm' } } }, });
The sortable option does not work on the 2 templated column.
Am I doing something wrong ?
Thanks in advance.
Regards, Antoine.