Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Date #7

Closed
Naoray opened this issue Mar 6, 2019 · 4 comments
Closed

Invalid Date #7

Naoray opened this issue Mar 6, 2019 · 4 comments

Comments

@Naoray
Copy link
Contributor

Naoray commented Mar 6, 2019

image

Changing the following lines in NotificationMessage.vue component resolves the issue.

NotificationMessage.vue

// showing invalid date
fromNow (date) {
    return new moment.tz(date.date, 'YYYY-MM-DD HH:mm:ss', date.timezone).local().fromNow()
}

// working
      fromNow (date) {
            return new moment(date, 'YYYY-MM-DD HH:mm:ss').local().fromNow()
      }
@chrisbjr
Copy link
Member

chrisbjr commented Mar 6, 2019

I see.. I think this issue relates to Laravel 5.8 not returning Date objects by default in APIs for created_at and updated_at anymore...

@chrisbjr
Copy link
Member

chrisbjr commented Mar 7, 2019

Confirmed.

Here is the response in Laravel 5.7:

date-57

After updating to Laravel 5.8, the response changes to this:

date-58

@chrisbjr
Copy link
Member

chrisbjr commented Mar 7, 2019

Fixed and tagged as 1.2.0

@skoyah
Copy link

skoyah commented May 5, 2019

I have the latest version of the package and the issue persists @chrisbjr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants