I'm new to the Angular world and perhaps I'm missing something obvious, if
so I count on you folks to inform me.
>From reading the documents on the Angular-Ui bootstrap datepicker, I see
this:
Popup Settings
-
datepicker-popup *(Default: 'yyyy-MM-dd')* : The format for displayed
dates.
In my code, following the example on the documentation page, I set this up
like this:
<input id="startDate" name="startDate" type="text" class="form-control"
show-weeks="false"
datepicker-popup="{{format}}" ng-model="days.today" is-open="opened"
min="min" datepicker-options="dateOptions"
close-text="Close It">
<span class="input-group-btn">
<button class="btn btn-default" ng-click="open($event)">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
There's more but you get the basic set up, The key piece here is
datepicker-options="dateOptions"
In the javascript controller for this component you'll see,
$scope.dateOptions = {
'year-format': "'yy'",
'datepicker-popup': "'MM/dd/yyyy'"
};
And this is where the confusion starts. On render of the page I get this
error message:
Controller 'ngModel', required by directive 'datepickerPopup', can't be
found!
However, the datepicker displays the correct date. And if I remove the
second line of the datpicker options, then again it works as it should. No
error message in the console.
Can anyone explain why this is in error?
Tony Giaccone.
--
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.