Datatables.net date display format -


i'm using datatables.net jquery plugin , populating data through asp.net mvc4.

one of columns date format. i'm interested in changing format of how displayed not changing type of column date string.

i'm using default initialization:

$('#data-table').datatable(); 

my 4th column date "created date" , displayed "7/07/2013 9:38:11 p.m." displayed either "7/07/2013" or "7 jul 2013".

i thought relatively easy task haven't been able find answer i'm after.

i'd avoid additional plugins if possible. there simple way i'm missing?

here came with. using how renders can manipulate way date displayed anyway want.

$('#data-table').datatable({     "aocolumndefs": [         {              "atargets": [0],              "bsearchable": false,              "stype": 'date',             "fnrender": function ( oobj ) {                 var javascriptdate = new date(oobj.adata[0]);                 javascriptdate = javascriptdate.getdate()+"/"+(javascriptdate.getmonth()+1)+"/"+javascriptdate.getfullyear();                 return "<div class='date'>"+javascriptdate+"<div>";             }         }     ] });  

i hope useful others...


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -