nhn / tui.grid

🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.42k stars 398 forks source link

Date Filter does not working on IE11 #1183

Closed eggplantiny closed 4 years ago

eggplantiny commented 4 years ago

Describe the bug I wanna filter data using TUI Grid and DateRangePicker with Vue.js

It does work good on Chrome browser but i catched it does not work on the IE11

tui-grid-bug-report-1

I changed the date range with another vue component and invoked method of tui.grid

and i use formatter function of tui grid to display date

i made a repository of exmaple app for you can check this bug

thx for your help and maintain this great application.

js87zz commented 4 years ago

@eggplantiny Sorry for late replying. I checked your issue. It's not the grid issue. The problem is Date constructor function issue. If the date format delimiter is ., the date is not parsed properly in IE11(maybe safari too)

new Date('2020.10.09') // cannot be parsed in IE11

So, you need to change the format and formatter option.

columns: [
    {
        name: 'createdAt',
        header: '생성일',
        filter: {
            type: 'date',
            operator: 'AND',
            // change dot to dash
            format: 'yyyy-MM-dd'
        },
        formatter ({ value }) {
            // change dot to dash
            return moment(value).format('YYYY-MM-DD')
        }
    },
    {
        name: 'userName',
        header: '사용자명'
    }
],