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

How will get current filed id or name ? #33

Closed
rohitkkrana opened this issue Jul 16, 2019 · 4 comments
Closed

How will get current filed id or name ? #33

rohitkkrana opened this issue Jul 16, 2019 · 4 comments

Comments

@rohitkkrana
Copy link

❔ Question

Suppose we have two people his name is jhon,tony and that list is dynamic it may be increase, so we need to get the get the name or id of current field event. how can we recognise it?

Link to a sandbox: link (optional)

@arthurdenner
Copy link
Owner

Hi @rohitkkrana! 👋

I'm sorry, but I didn't understand what you meant. Could you explain more or provide a sandbox reproducing your question?

Thanks in advance!

@rohitkkrana
Copy link
Author

@arthurdenner
Copy link
Owner

arthurdenner commented Jul 17, 2019

Thanks @rohitkkrana! I think I understand what you mean now.

This is somewhat related to #30, because the onDateChange prop is called only with the new date, nothing else. I think I'll refactor this library in the next few weeks to improve it.

Right now, you can workaround this behaviour in the following way:

  • Replace your onDateChange with:
onDateChange={newDate => this.checkDate(v, newDate)}
  • Update your checkDate method with:
checkDate = (user, newDate) => {
    console.log(user, newDate);
  };

And then you will have a way to identify which user is related to the selected date.

Let me know if you have any other question or if my suggestion does not solve your problem.

@rohitkkrana
Copy link
Author

Thanks and great job this module is so awesome. Thanks once again for you and your team...

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