Я создаю приложение с twitter bootstrap, Angular js и Taffy DB.Twitter bootstrap datepicker в Angular js
JavaScript:
$(function() {
$('#datepicker').datepicker();
});
$scope.submit = function() {
console.log($scope.eventdate);
};
HTML:
<label for="eventdate">Date</label>
<div class="input-append date" id="datepicker" data-date-format="dd-mm-yyyy">
<input class="span2" size="20" type="text" id="eventdate" ng-model="eventdate">
<span class="add-on"><i class="icon-th"></i></span>
</div>
Но console.log($scope.eventdate);
не определено.
Пожалуйста, советы
не так. Вы не можете смешивать jquery и angularjs. Посмотрите на компоненты углового ui bootstrap здесь http://angular-ui.github.io/bootstrap/. В принципе, для этого вам нужна директива. – Chandermani