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

Updating Calendar on input change #322

Open
jonnycraze opened this issue Feb 7, 2017 · 6 comments
Open

Updating Calendar on input change #322

jonnycraze opened this issue Feb 7, 2017 · 6 comments

Comments

@jonnycraze
Copy link

I apologize if this is addressed somewhere else, I just haven't found a clear answer one way or the other.

If I focus on an input with the date-time attribute, and update the value in the input field, is there a way to have that update the Calendar UI as well? I'm not seeing it in current examples but wondering if there is a way to do it.

Thanks much

@DanTalash
Copy link
Contributor

If I understood you correctly, you want to have both an input element and a div element using the same date, and if one is updated then the other should automatically update?

The only real thing you need to do is set all elements to use the same object, and set the watch-direct-changes="true" attribute on the div elements. See this plunkr for an example.

@mbaumrucker
Copy link

I'm having the same issue as @jonnycraze .

When updating the input manually my model doesn't get updated. The fix @DanTalash suggests is not what I'm looking for, I don't have 2 calendars, just 1 where I want to be able to let the user edit the date from the input itself.

Another option is to disable direct input, but I can't find a solution for that.

@dsvictorh
Copy link

+1

2 similar comments
@payros
Copy link

payros commented Sep 17, 2017

+1

@philippone
Copy link

+1

@ArgV04
Copy link

ArgV04 commented Nov 17, 2017

Another option is to disable direct input, but I can't find a solution for that.

Simply make the input field readonly to disable direct input flow

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

7 participants