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

Incorrect event slot prop returned #42

Closed
lexuzieel opened this issue Feb 1, 2018 · 1 comment
Closed

Incorrect event slot prop returned #42

lexuzieel opened this issue Feb 1, 2018 · 1 comment

Comments

@lexuzieel
Copy link
Contributor

lexuzieel commented Feb 1, 2018

I have been trying to override event template with my own, however it seems that the event prop returned is incorrect (data described (here)[https://github.com/richardtallent/vue-simple-calendar#event] is missing).

This template code:

<template slot="event" slot-scope="props">
    <div>
        @{{ props.event }}
    </div>
</template>

Produces this result (event passed into events list):

{ "startDate": "2018-02-01 09:00:00", "endDate": "2018-02-01 10:30:00", "title": "Event 1" } 

Digging into the source code I found that it actually returns originalEvent itself and not normalized version, which would return something like this:

{ "originalEvent": { "startDate": "2018-02-01 09:00:00", "endDate": "2018-02-01 10:30:00", "title": "Event 1" }, "startDate": "2018-02-01T06:00:00.000Z", "endDate": "2018-02-01T07:30:00.000Z", "classes": [ "offset4", "span1", "eventRow1" ], "title": "Event 1", "id": "eg4fdt523xk", "eventRow": 0 } 

I guess it's a bug? If so, I created a pull request fixing this: #41

Otherwise this is a great component, thank you for your hard work!

@richardtallent
Copy link
Owner

Thanks @lexuzieel! That was indeed a bug. PR accepted.

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

2 participants