Join the Stack Overflow Community
Stack Overflow is a community of 6.3 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I'm trying to get first element from the array of values using exporterFieldCallback and export it to CSV file.

exporterFieldCallback: function ( grid, row, col, value ) {
                if ( col.name == 'dates' ) {
                  return moment(value[0]).format("YYYY-MM-DD HH:mm");
                }
                else {
                  return value;
                }
            }

but I got TypeError: Cannot read property '0' of undefined error.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.