I'm using the library vue i18n to display the time and in my Date Localization file I have the following format:
export default {
'nl': {
short: {
day: 'numeric', month: 'short', year: 'numeric'
},
}
};
and in the vue page itself I do this:
<td>{{ $d(new Date('2019-07-29 14:14:55'), 'short') }}</td>
Which works fine in Chrome and returns 29 jul. 2019
. In Safari however, I get an invalid Date format error. I checked other questions here on SO and most of them suggested using Moment.js (which doesn't work for me because I'm already using vue i18n), others suggested adding the T
character, Z
character to the object or replace the -
with a /
or a combination of that. None of these suggestions worked for me. Any other ideas?