Created
April 10, 2014 04:14
-
-
Save jbruni/10342051 to your computer and use it in GitHub Desktop.
A Pen by J Bruni.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="main" ng-app="codepen" ng-controller="codepenCtrl"> | |
<p class="form-group"> | |
<input class="form-control" type="text" value="{{ date | date:'fullDate' }}" readonly> | |
</p> | |
<p class="form-group"> | |
<input class="form-control" type="text" ng-model="text"> | |
</p> | |
<p> | |
<button popover-placement="bottom" popover-template="calendar.html" class="btn btn-default">Date Picker</button> | |
</p> | |
<script id="calendar.html" type="text/ng-template"> | |
<div ng-model="date"> | |
<datepicker show-weeks="false"></datepicker> | |
</div> | |
<hr /> | |
<div class="alert alert-success">{{ text }}</div> | |
</script> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('codepen', ['ui.bootstrap']); | |
var codepenCtrl = function ($scope) { | |
$scope.date = new Date(); | |
$scope.text = 'Click a date to check the binding.'; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.main { | |
padding: 2em; | |
text-align: center; | |
width: 50%; | |
margin: auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment