This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(timepicker): restyled for bootstrap 3
- Loading branch information
1 parent
a99b360
commit 6724a72
Showing
3 changed files
with
84 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
<div ng-controller="TimepickerDemoCtrl"> | ||
<div ng-model="mytime" ng-change="changed()" class="well well-small" style="display:inline-block;"> | ||
<timepicker hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></timepicker> | ||
|
||
<div ng-model="mytime" ng-change="changed()" class="row" style="display:inline-block;"> | ||
<div class="row"> | ||
<div class="col-xs-5 col-lg-5"> | ||
<timepicker hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></timepicker> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<pre>Time is: {{mytime | date:'shortTime' }}</pre> | ||
|
||
<div>Hours step is: <select ng-model="hstep" ng-options="opt for opt in options.hstep"></select></div> | ||
<div>Minutes step is: <select ng-model="mstep" ng-options="opt for opt in options.mstep"></select></div> | ||
<pre class="alert alert-info">Time is: {{mytime | date:'shortTime' }}</pre> | ||
|
||
<div class="row"> | ||
<div class="col-xs-6"> | ||
Hours step is: | ||
<select class="form-control" ng-model="hstep" ng-options="opt for opt in options.hstep"></select> | ||
</div> | ||
<div class="col-xs-6"> | ||
Minutes step is: | ||
<select class="form-control" ng-model="mstep" ng-options="opt for opt in options.mstep"></select> | ||
</div> | ||
</div> | ||
|
||
<button class="btn" ng-click="toggleMode()">12H / 24H</button> | ||
<button class="btn" ng-click="update()">Set to 14:00</button> | ||
<hr> | ||
|
||
<button class="btn btn-info" ng-click="toggleMode()">12H / 24H</button> | ||
<button class="btn btn-default" ng-click="update()">Set to 14:00</button> | ||
<button class="btn btn-danger" ng-click="clear()">Clear</button> | ||
</div> | ||
|
||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
<table class="form-inline"> | ||
<tr class="text-center"> | ||
<td><a ng-click="incrementHours()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td> | ||
<td> </td> | ||
<td><a ng-click="incrementMinutes()" class="btn btn-link"><i class="icon-chevron-up"></i></a></td> | ||
<td ng-show="showMeridian"></td> | ||
</tr> | ||
<tr> | ||
<td class="control-group" ng-class="{'error': invalidHours}"><input type="text" ng-model="hours" ng-change="updateHours()" class="span1 text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2"></td> | ||
<td>:</td> | ||
<td class="control-group" ng-class="{'error': invalidMinutes}"><input type="text" ng-model="minutes" ng-change="updateMinutes()" class="span1 text-center" ng-readonly="readonlyInput" maxlength="2"></td> | ||
<td ng-show="showMeridian"><button type="button" ng-click="toggleMeridian()" class="btn text-center">{{meridian}}</button></td> | ||
</tr> | ||
<tr class="text-center"> | ||
<td><a ng-click="decrementHours()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td> | ||
<td> </td> | ||
<td><a ng-click="decrementMinutes()" class="btn btn-link"><i class="icon-chevron-down"></i></a></td> | ||
<td ng-show="showMeridian"></td> | ||
</tr> | ||
</table> | ||
<span> | ||
<div class="row"> | ||
<div class="col-xs-4 text-center"> | ||
<a ng-click="incrementHours()" class="btn btn-link"><i class="glyphicon glyphicon-chevron-up"></i></a> | ||
</div> | ||
<div class="col-xs-6 text-center"> | ||
<a ng-click="incrementMinutes()" class="btn btn-link"><i class="glyphicon glyphicon-chevron-up"></i></a> | ||
</div> | ||
<div class="col-xs-2"> </div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-xs-4"> | ||
<div class="form-group" ng-class="{'has-error': invalidHours}" style="margin-bottom: 0px"> | ||
<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2"> | ||
</div> | ||
</div> | ||
<div class="col-xs-6"> | ||
<div class="input-group" ng-class="{'has-error': invalidMinutes}"> | ||
<span class="input-group-addon">:</span> | ||
<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2"> | ||
</div> | ||
</div> | ||
<div class="col-xs-2"> | ||
<button ng-click="toggleMeridian()" class="btn btn-default text-center" ng-show="showMeridian">{{meridian}}</button> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-xs-4 text-center"> | ||
<a ng-click="decrementHours()" class="btn btn-link"><i class="glyphicon glyphicon-chevron-down"></i></a> | ||
</div> | ||
<div class="col-xs-6 text-center"> | ||
<a ng-click="decrementMinutes()" class="btn btn-link"><i class="glyphicon glyphicon-chevron-down"></i></a> | ||
</div> | ||
<div class="col-xs-2"> </div> | ||
</div> | ||
</span> |