Hey Plumsail,
I'm trying to filter my list/library control using a date field but it's not returning any results.
This is the code I'm using:
//Code will filter the Workforce List/Library Control based on Date
WorkforceCOHDataTable.ready(function() {
filterWorkforceCOHDTbyDate();
});
//filter List or Library with new value when Search field changes
fd.field('Date1').$on('change', function() {
filterWorkforceCOHDTbyDate();
});
function filterWorkforceCOHDTbyDate(){
if(fd.field('Date1').value){
//Filters Date Column
WorkforceCOHDataTable.filter = "<Eq><FieldRef Name='Effective_Date'/><Value Type='DateTime'>"
+ fd.field('Date1').value + "</Value></Eq>";
}
else{
WorkforceCOHDataTable.filter = '';
}
WorkforceCOHDataTable.refresh();
}
The dataType of the "Effective_Date" field is a date field.
Upon entering the value in the Date1 field, the library tries to filter the records but doesn't return anything in the specified filter criteria.
Many thanks for your time and effort!