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

Not showing today but the date from the scope #197

Closed
toben opened this issue Nov 4, 2015 · 2 comments · Fixed by #198
Closed

Not showing today but the date from the scope #197

toben opened this issue Nov 4, 2015 · 2 comments · Fixed by #198

Comments

@toben
Copy link

toben commented Nov 4, 2015

Hello,

I have a date-range with two date :

<div date-range start="ar.startDate" end="ar.endDate" ></div>

These dates are filled after a $http request but for example, we are the 4 November and even if the startDate and endDate are in September, the date picker will show the month of 4 november. Is there a way to show the start month and end month ?

Maybe, I missread the documentation...

Sorry for my english.

@DanTalash
Copy link
Contributor

  • As you mentioned, you receive the data via a $http request, meaning the directive initializes without the data being available.
  • I think the issue here is that the date-range directive does not watch for data changes. Due to this deficiency, when your $http request returns the dates in question, the directive doesn't update the inner pickers and they remain set to the default dates.
  • I have fixed this issue and added a new PR.

@toben
Copy link
Author

toben commented Nov 5, 2015

Ok ! Thank you very much. I wait the merge of your PR then

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

Successfully merging a pull request may close this issue.

2 participants