Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format a column field as a date #3

Open
MesquiteGIS opened this issue Jul 15, 2015 · 0 comments
Open

format a column field as a date #3

MesquiteGIS opened this issue Jul 15, 2015 · 0 comments

Comments

@MesquiteGIS
Copy link

I'm having trouble getting one of my fields to format as a date. I've defined my columns under gridOptions in the search.js file. My code looks like this:

    createFeatureTable: function () {
        var attributeTable = dijit.byId('attributesContainer_widget');
        this.queryID = this.queryID + 1;

        var tables = [
            {
                title: this.i18n.searchTXT + ' ' + this.queryID,
                topicID: this.queryID,
                gridOptions: {
                    columns:[
                                { label: 'Section ID', field: 'SectionID', width: 100,},
                                { label: 'Street Name', field: 'FullStreetName', width: 170, },
                                { label: 'Begin Point', field: 'BeginPoint', width: 170, },
                                { label: 'End Point', field: 'EndPoint', width: 170, },
                                { label: 'Surface Condition Rating', field: 'SurfaceConRating', width: 100, },
                                { label: 'Drainage Rating', field: 'DrainageRating', width: 150, },
                                //{ label: 'Evaluated', field: 'EvalDate', width: 150,},
                                { label: 'Evaluated By', field: 'EvalBy', width: 100, },
                                {
                                field: 'EvalDate',
                                label: 'Evaluated',
                                get: function (object) { // allow export as a proper date
                                    return new Date(object.EvalDate);
                                },
                                formatter: formatDateTime
                            }
                    ],
                },
                queryOptions: {
                    queryParameters: {
                        url: this.selectionIdentifyLayerDijit.item.url + '/' + this.selectionIdentifyLayerDijit.item.subID,
                        maxAllowableOffset: 100,
                        where: this.objectiidfield + " IN (" + this.ids + " )"
                    },
                    idProperty: this.objectiidfield
                }
            }
        ];

        var table = attributeTable.addTab(tables[0]);

    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant