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

no events #67

Open
kapil9-10 opened this issue Jun 11, 2020 · 3 comments
Open

no events #67

kapil9-10 opened this issue Jun 11, 2020 · 3 comments

Comments

@kapil9-10
Copy link

is there any event which triggers on when you click on ok button
on datePicker

@giulianimartini
Copy link

Hey @kapil9-10,

Did you check the Getting/Setting Date and Time section on Features?

You can listen to the dateChange event on DatePickerField.

Here is an example of using it with vue binding:

<DatePickerField @dateChange="onDateTimeChange1" :date="dateTime1"></DatePickerField>

Where dateTime1 is your date, for example:

data() { return { dateTime1: new Date(), } },

Then in your methods:

methods: { onDateTimeChange1: function(args) { this.dateTime1 = args.value; },

So it will get the date on args.value when you click the 'OK' button. If you click 'Cancel', it will no get the value and it will keep the old one.

Hope it helps.

@kapil9-10
Copy link
Author

thanks for help,,
one more query how will I know when he just scroll or clicked ok

@giulianimartini
Copy link

Hi @kapil9-10,

good to know it helped you.

I don't know if there's an event to capture the scroll, but the click is get on the dateChange event.
So, as I explained in the last post, when you click on 'OK', it will get the value that you have set. Otherwise, if you click 'Cancel', it will get the old value.
So you can get the 'OK' click on dateChange event =)

Hope it helps!

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