Filter with datefield

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. #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...
    2. 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...
    3. 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...
    4. 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 )...
    5. 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"... ...
  3. #2

    Default Re: Filter with datefield

    What would you like this filter to do?
    Dan Bracuk Guest

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139