Potential Bug in moment.js Implemenatation?

I am using Mapper on a date field with my intended output in MM/DD/YY format.

{{ moment(self).format('MM/DD/YY') }}

If I do MM or MM/DD, it works. If I do MM/DDYY, it works. However as soon as I add / between MM and YY (MM/DD/YY) it defaults back to the standard Date format.

ScreenClip

ScreenClip

ScreenClip

ScreenClip

Hi, thanks for reaching out! It seems like the Column type formatting might be taking over here and overriding the mapper that you are using. I believe that if you change the Column type from 'Date' to 'Default', you will get the behavior that you are looking for.



1 Like

Hi Joe,

I had tried that initially however the issue with that is it breaks sorting the column by date. A date column that cannot be sorted by date is not very useful. Note the cell with year 2021 not being sorted properly.

image

Changing it to YY/MM/DD does not fix the issue.

image

Interesting! Are you sorting by clicking on the column header? Seems to work for me on my end, so trying to reproduce the issue.


May be an issue with my query, I will update after I look a little deeper.

There was an issue in a way I was formatting the dates in my query. I fixed it and the sorting worked properly. Thanks for the help!

Awesome! Glad to hear that it worked.