wy-ei / vue-filter

:v: A collection of Vue.js filter. [Depressed]
MIT License
353 stars 40 forks source link

Vue Filter Date not working in ios device #25

Open chansovann opened 5 years ago

chansovann commented 5 years ago

Hello team, Thank for make good package for Vue.js. I'm already used your package in my project it work fine for desktop but if i open in safari in IOS device not show. you can see my attach file. Thank you! photo 10-13-18 9 24 51 am

wy-ei commented 5 years ago

@TholthoeunChansovann Please check the value you passed to the date filter. I guess you probably pass an invalid value into it.

The first two lines of this filter is below:

function date(date, formatString) {
    var d = new Date(date); 
    ...

image

chansovann commented 5 years ago

@wy-ei i use like this {{list.start_date | date('%Y-%m-%d %H:%M')}} it not work

wy-ei commented 5 years ago

@TholthoeunChansovann Please check the value of list.start_date, you can run new Date(list.start_date) in somewhere, and make sure the return value is not Invalid Date.

And if the value of list.start_data is a string like '2018-10-19 22:22:10', the constructor of Date may not parse it correctly.

jackie-cheng commented 5 years ago

yes 。ios and IE11+ is not work image