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

Calendar select event has no value #144

Closed
fairking opened this issue Jan 15, 2020 · 5 comments
Closed

Calendar select event has no value #144

fairking opened this issue Jan 15, 2020 · 5 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@fairking
Copy link

fairking commented Jan 15, 2020

"primevue": "1.0.0"

Regarding docs:
image

Calendar select event has no value. e does not contain value property:

<Calendar :value="value" @select="dateSelect" date-format="dd.mm.yy" 
:show-time="showTime" :readonly="readonly" />
methods: {
    dateSelect(e) {
        console.log(e);
    },
},
@fairking
Copy link
Author

fairking commented Jan 15, 2020

Ok. I think it is something related to the selection of the input.

  1. Before input select:
    image

  2. After input select:
    image

so the following e value:

methods: {
    dateSelect(e) {
        console.log(e);
    },
},

in the first example it is a pure date but in the second it is an event with no value

@fairking
Copy link
Author

fairking commented Jan 16, 2020

My temporary solution is:

methods: {
    dateSelect(e) {
        if (e instanceof Date) {
            // logic on select
        }
    },
},

@cagataycivici cagataycivici self-assigned this Jan 20, 2020
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 20, 2020
@cagataycivici cagataycivici added this to the 1.0.1 milestone Jan 20, 2020
@cagataycivici
Copy link
Member

Please see;

#148

@cagataycivici
Copy link
Member

Use date-select with 1.0.1

@fairking
Copy link
Author

Thank you @cagataycivici

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants