In my experience you can avoid trouble by encapsulating the input tag, rather than re-using it, so you might try
<div fdatepicker> and then let the directive's template add the input inside the div. That way your directive's ngModel is separate from the input's ngModel. On Monday, February 10, 2014 8:20:49 AM UTC+1, Sébastien Saunier wrote: > > Hello guys, > > I am trying to wrap the fondation-bootstrap datepicker into a directive > and I have some trouble watching for an update in my controller. I get two > notifications, one with a Date object, and one with the string value of the > input (which I don't want). > > I asked my question on SO: > http://stackoverflow.com/questions/21660774/creating-a-directive-for-a-datepicker-watching-model-triggers-two-updates > > Any help much appreciated! > > Thanks. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
