adopted-ember-addons / ember-moment

MIT License
399 stars 122 forks source link

output "invalid date" #206

Closed hairetdin closed 7 years ago

hairetdin commented 7 years ago

In the my application template: Task completed: {{moment-format task.date_closed 'DD.MM.YYYY, H:mm'}}. The browser displays the correct date when task.date_closed is Date, but if task.date_closed is null the browser displays Task completed: Invalid date. Of course, I can put a check in the template, but it is very inconvenient. I think, it is right to not display any messages if set to null.

jasonmit commented 7 years ago

This is already supported via configuration: https://github.com/stefanpenner/ember-moment#global-allow-empty-dates

Feel free to reopen if you run into issues with this.