-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from brenovieira/master
Fixing issue when more than one datepicker is visible
- Loading branch information
Showing
5 changed files
with
169 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:ng="http://angularjs.org" id="ng-app" ng-app="app"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>gm.datepickerMultiSelect Example</title> | ||
|
||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.14.2/ui-bootstrap-tpls.min.js"></script> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" /> | ||
|
||
<!-- App files --> | ||
<script src="../dist/gm.datepickerMultiSelect.min.js"></script> | ||
<script src="../modules/app.js"></script> | ||
<style> | ||
body { padding:10px; } | ||
td { vertical-align: top } | ||
</style> | ||
</head> | ||
|
||
<body ng-controller='AppCtrl as app'> | ||
<div class='panel'><h3>Selection Type:</h3> | ||
<div class='btn-group'> | ||
<button class='btn btn-primary' ng-model='app.type' uib-btn-radio='"individual"'>Individual</button> | ||
<button class='btn btn-primary' ng-model='app.type' uib-btn-radio='"range"'>Range</button> | ||
</div> | ||
</div> | ||
<table> | ||
<tr> | ||
<td> | ||
<uib-datepicker ng-model='app.activeDate' multi-select='app.selectedDates' select-range='{{app.type=="range"}}'></uib-datepicker> | ||
</td> | ||
<td style='width:50px'> | ||
</td> | ||
<td> | ||
<div> | ||
Selected Dates: | ||
<div class='well well-sm'> | ||
<div ng-repeat='d in app.selectedDates'> | ||
{{d | date : 'fullDate'}} | ||
<button class='btn btn-xs btn-warning' style='margin:5px' ng-click='app.removeFromSelected(d)'>Remove</button> | ||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<hr /> | ||
<div class='panel'><h3>Selection Type 1:</h3> | ||
<div class='btn-group'> | ||
<button class='btn btn-primary' ng-model='app.type1' uib-btn-radio='"individual"'>Individual</button> | ||
<button class='btn btn-primary' ng-model='app.type1' uib-btn-radio='"range"'>Range</button> | ||
</div> | ||
</div> | ||
<table> | ||
<tr> | ||
<td> | ||
<uib-datepicker ng-model='app.activeDate1' multi-select='app.selectedDates1' select-range='{{app.type1=="range"}}'></uib-datepicker> | ||
</td> | ||
<td style='width:50px'> | ||
</td> | ||
<td> | ||
<div> | ||
Selected Dates 1: | ||
<div class='well well-sm'> | ||
<div ng-repeat='d in app.selectedDates1'> | ||
{{d | date : 'fullDate'}} | ||
<button class='btn btn-xs btn-warning' style='margin:5px' ng-click='app.removeFromSelected1(d)'>Remove</button> | ||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
This file contains 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
This file contains 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