jsgrid icon indicating copy to clipboard operation
jsgrid copied to clipboard

Date Filter cannot read property 'val' of undefined

Open robert1233 opened this issue 6 years ago • 3 comments

Hi,

I'm trying to add a filterTemplate, that allows me to select a date. This is what I have so far:

            { name: "IEPDate", type: "text", title: "IEP Date", css: "smallfont", width:50,
                itemTemplate: function (value) {
                    return moment(value).add(1, 'days').format("MM/DD/YYYY");
                },
                filterTemplate: function(){
                    return $("<input class='form-control form-control-sm' type='date' value='2018-04-17'>");
                }  

My browser gives me the error:

jsgrid.min.js:7 Uncaught TypeError: Cannot read property 'val' of undefined
    at c.filterValue (jsgrid.min.js:7)
    at d.<anonymous> (jsgrid.min.js:7)
    at c.<anonymous> (jsgrid.min.js:7)
    at Function.each (jquery.min.js:2)
    at d._eachField (jsgrid.min.js:7)
    at d.getFilter (jsgrid.min.js:7)
    at d.loadData (jsgrid.min.js:7)
    at d.search (jsgrid.min.js:7)
    at jsgrid.min.js:8
    at HTMLInputElement.<anonymous> (jsgrid.min.js:8)

Any help appreciated, thank you!

robert1233 avatar Apr 17 '18 16:04 robert1233

Currently experiencing the same issue. @tabalinas any thoughts here?

andrewgoodnz avatar May 24 '18 23:05 andrewgoodnz

@andrewgoodnz Did you ever find a fix for this?

robert1233 avatar Jun 25 '18 14:06 robert1233

did you find the solution, guys?

TimaBuldzer avatar Aug 13 '21 05:08 TimaBuldzer