The Safari browser in IOS5 and above (not including IOS5) correctly interprets the date object of the new date (' 2013-10-21 ') in JavaScript. However, the IOS5 version of Safari explains that new date (' 2013-10-21 ') is not correct, and the return in IOS5 Safari is always "Invalid date". later I found the information on the Internet, originally the low version of Safari explained that the new Date (' 2013-10-21 ') This object is not the same, in IOS5 Safari does not support this type of writing,then I checked a lot of foreign technical blog, finally found a solution, originally wanted to IOS5 in the safari can correctly parse the new Date () so it must be writtennew Date (' 2013/10/21 '); orvar d = new Date (date);
d = d.getfullyear () > 0? d:new Date (Date.parse (Date.replace (/-/g, "/"));The main thing is back in the background. The format of the date returned is ' 2013-10-21 '. Causes it to not be interpreted correctly in the low-end version of Safari! Tai Hang!!!
Vue's path to the pit (eight)----Ios:safari incompatible with date issues in JavaScript