Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
menotti08 #1
Filter with datefield
hello people how can i make a filter with the date field please help me
i have this code if you intall coldfusion in your pc
you can run it, im using the cfartgallery database that coldfusion install
<CFQUERY NAME="nuevo" DATASOURCE="cfartgallery">
SELECT ORDERDATE, STATE, CITY, PHONE
from ORDERS
</CFQUERY>
<cfsavecontent variable="actionFilter">
if(_global.arrMembers == undefined) _global.arrMembers =
data.dataProvider.slice(0);
var arrMembers = _global.arrMembers;
var arrDisplay:Array = [];
var fortext = forInput.text.toLowerCase();
var selected = column.selectedItem.data;
for(var i = 0; i < arrMembers.length; i++)
{
if(arrMembers[selected].substr(0,fortext.length).toLowerCase() ==
fortext)
{
arrDisplay.push(arrMembers);
}
}
data.dataProvider = arrDisplay;
</cfsavecontent>
<cfform name="myForm" format="flash" width="700" height="500">
<cfformgroup type="panel" label="Search our Members">
<cfformgroup type="horizontal">
<cfinput type="text" name="forInput" width="120" onchange="#actionFilter#"
label="Filter by:">
<cfselect name="column" label="in:" onchange="forInput.text='" width="90">
<option value="state">state</option>
<option value="city">city</option>
</cfselect>
</cfformgroup>
<cfgrid name= "data" query="nuevo" height="200" rowheaders="false">
<cfgridcolumn name="Orderdate" header="Date">
<cfgridcolumn name="state" header="state">
<cfgridcolumn name="city" header="city">
</cfgrid>
</cfformgroup>
</cfform>
menotti08 Guest
-
#40499 [NEW]: filter sapi does not register any highlightning filter
From: php at henke37 dot cjb dot net Operating system: any PHP version: 6CVS-2007-02-15 (CVS) PHP Bug Type: Apache2 related... -
qs. about datefield
hi, I am using datefield in my form. I can choose the date from the calendar without any problem. But if I want to delete the date from the... -
Data Grid Header Filter Renderer or how do I get aheader to filter the data in a datagrid.
Okay so on the same theme as why isn't the datagrid like Excel, I have created a (very cool) Filter header. 1) The filter looks like any other... -
DateField
Hey,Does anyone here knows about how to populate <mx:DataField> with dataprovider data coming from http service from a jsp file (generated XML )... -
Flash datefield
The date choose has a min height (it won't get smaller then a certain size) you need to increase the height of your form <cfform height="300"... ... -
-
BKBK #3
Re: Filter with datefield
>... how can i make a filter with the date
If d1 and d2 are two datetime objects and d3 a datetime column in a query,
Coldfusion allows you to play like this
- <cfif d1 GT d2>
- order by d3
- where d3 > GetDate()
BKBK Guest



Reply With Quote

