bluestarcpc
Technical User
How can I use the code below to allow a date selection to filter a grid
Thanks
Charlie
Thanks
Charlie
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<!-- ----------------- aschange_date for Grid--------------------- -->
<cfsavecontent variable="aschange_date_grid">
if(_global.arrDateGrid == undefined) _global.arrDateGrid = data.dataProvider.slice(0);
var arrDateGrid = _global.arrDateGrid;
var arrDisplay:Array = [];
for(var i = 0; i < arrDateGrid.length; i++)
{if(arrDateGrid[i].ID == test_date_evnt3.value )
{arrDisplay.push(arrDateGrid[i]);}}
data.dataProvider = arrDisplay;
</cfsavecontent>
<!-- ----------------- Start Main Code------------------- -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<cfformgroup type="panel" label="Filter Grid By Calendar Date" width="455">
<cfgrid name="data2" query="get_staff" width = "425">
<cfgridcolumn header="Empl Number" name="Empnum" width = "75" />
<cfgridcolumn header="Penta Number" name="pempnum" width = "75"/>
<cfgridcolumn header="First Name" name="fname" width = "75"/>
<cfgridcolumn header="Last Name" name="lname" width = "75"/>
<cfgridcolumn header="Date Hired" name="ddired" width = "80" mask="MM/DD/YYYY" />
</cfgrid>
</cfformgroup>
</cfformgroup>
</cfform>
</tr></table>
<!-- ----------------- start date change for grid 3 --------------------- -->
Scroll Test - Change Date - 3 using onchange="aschange_date" to filter Grid
<table><tr>
<td>To the right is date control using ONCHANGE "aschange_date" to filter Grid</td>
<td><cf_ct_date_input name="test_date_evnt3" value="05/01/2005"
onchange="aschange_date_grid(this.value);"></td>
</tr></table>
<TABLE><TR><TD NOWRAP>
</body>
</html>