Posts

Showing posts from December, 2022

Donate

Quasar date.formatDate() Function Not Formatting Dates In Q-Table Component

Image
Hello All, When formatting date columns in Quasar table (QTable) the accepted solution is to use the date.formatDate() function and supply the parameters with the actual value and the format type such as below code. columns : [ //More Columns here... { name : "startTime" , label : "Start Time" , align : "right" , sortable : true , field : row => row.startTime, format : val => date.formatDate(val, "DD-MMM-YYYY hh:mm:ss A" ), }] And then render the columns to the table component. <q -table :data= "activeUsers" :columns= "columns" :separator= "separator" table-header-class= "bg-cts-purple text-white" :rows-per-page-options= "[10, 20, 30, 0]" :filter= "filter" :filter-method= "filterActiveUsers" > <template # body= "props" > <q -tr :props= "props" > <q -td key= "opera...

Donate