1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    4
    Vote Rating
    0
    ociowaty is on a distinguished road

      0  

    Default Unanswered: Date Grid Filter

    Unanswered: Date Grid Filter


    Hello,
    I have grid:
    Code:
    Ext.define('App.view.grids.Campaigns' ,{
        extend: 'Ext.grid.Panel',
        alias : 'widget.campaignsGrid',
        disableSelection: true,
        height: Ext.getBody().getViewSize().height-55,
        store: store,
        viewConfig: {
            trackOver: false
        },
        features: [filters],
        initComponent: function() {
    
            this.columns = [
                { header: 'name', dataIndex: 'name', flex:1, filter : true},
                { header: 'status', dataIndex: 'status', flex:1, filter: { type: 'list',
                    store: statusStore
                }},
                { header: 'startDate', dataIndex: 'startDate', flex:1, filter : true, renderer:Ext.util.Format.dateRenderer('m-d-Y H:i:s')},
                { header: 'endDate', dataIndex: 'endDate', flex:1, filter : true},
            ];
    
            this.callParent(arguments);
        }
    });
    Store, model:
    Code:
    Ext.define('Compaigns', {
        extend: 'Ext.data.Model',
        fields: [
            { name: 'name' },
            { name: 'status' },
            { name: 'startDate', type: 'date', dateFormat: 'Y-m-d H:i:s'},
            { name: 'endDate',type: 'date', dateFormat: 'Y-m-d H:i:s' },
        ]
    });
    var store = Ext.create('Ext.data.Store', {
        model: 'Compaigns',
        autoLoad: false,
        autoSync: false,
        autoDestroy: true,
        pageSize: 20000,
        buffered: true,
    
    
        clearFilter : false,
        idClient: 0,
    
        proxy: {
            type: 'ajax',
            api: {
                read:    '/campaigns'
            },
            reader: {
                type: 'json',
                root: 'campaigns',
                successProperty: 'success',
                totalProperty : 'total'
            }
        }
    });
    I have problem with filtration by Dates. I'm using remote filtration from examples ( http://dev.sencha.com/deploy/ext-4.0...ter-local.html )
    Problem is when I want to filter data by date field. The request is sending but in POST/GET array there no filtration data.

    Did someone have the same problem ?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,633
    Answers
    3452
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What Ext JS 4.x.x version are you using?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1