Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Calendar doesn't show on page load with autofocus #46

Closed
sebn opened this issue Nov 14, 2013 · 2 comments
Closed

Calendar doesn't show on page load with autofocus #46

sebn opened this issue Nov 14, 2013 · 2 comments

Comments

@sebn
Copy link

sebn commented Nov 14, 2013

I need to change field, then come back for the calendar to pop up.

<input type="text" ng-model="line.date" required ng-disabled="firstLineEntered()" placeholder="Date" id="foo" ui-date autofocus>

Adding the following line on the bottom of the page works:

<script>$(function() { $('#foo').focus(); });</script>

Using:

  • angular 1.2.0-rc.3
  • jquery 1.9.1
  • jquery-ui 1.10.3
  • ui-date master branch
  • Chromium 30.0.1599.101 (227552)

Is this a bug, or does it have something to do with the way angular works?
Wdyt?

@sebn
Copy link
Author

sebn commented Nov 14, 2013

I can reproduce it on the demo page by just adding the autofocus attribute.

Trying to figure out why...

@sebn
Copy link
Author

sebn commented Nov 14, 2013

Actually, it doesn't work when using the datepicker plugin directly.
So it has nothing to do with the ui-date directive.

Sorry for the noise.

@sebn sebn closed this as completed Nov 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant