Select filter remove time from datetime

Select filter remove time from datetime

JanezJansaJanezJansa Posts: 2Questions: 1Answers: 0

Hi,

my table is populated with two columns that are datetime format d.m.Y H:i , I need to display them with time, but I want to filter them only by date (those two columns) .

I tried with this code but I get duplicated values in select filter

function fnCreateSelect( aData )
{
    var r='<select><option value=""></option>', i, iLen=aData.length;
    for ( i=0 ; i<iLen ; i++ )
    {  
            if(aData[4])+
            {          
                var date = aData[i];
                date = date.substring(0,10);
              r += '<option value="'+date+'">'+date+'</option>';
            }
        else{            
                r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
            }       
    }
        
        
    return r+'</select>';
}

Answers

This discussion has been closed.