This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 6 files changed +959
-342
lines changed
6 files changed +959
-342
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
< div ng-controller ="DatepickerDemoCtrl ">
2
- < datepicker ng-model ="dt " show-weeks ="showWeeks " starting-day ="1 " date-disabled ="disabled(date, mode) " min ="minDate " max ="'2015-06-22' "> </ datepicker >
3
2
< pre > Selected date is: < em > {{dt | date:'fullDate' }}</ em > </ pre >
4
3
4
+ < div class ="well well-small pull-left " ng-model ="dt ">
5
+ < datepicker min ="minDate " show-weeks ="showWeeks "> </ datepciker >
6
+ </ div >
7
+
8
+ < div class ="form-horizontal ">
9
+ < input type ="text " datepicker-popup ="dd-MMMM-yyyy " ng-model ="dt " open ="opened " min ="minDate " max ="'2015-06-22' " datepicker-options ="dateOptions " date-disabled ="disabled(date, mode) " ng-required ="true " />
10
+ < button class ="btn " ng-click ="open() "> < i class ="icon-calendar "> </ i > </ button >
11
+ </ div >
12
+
13
+ < hr />
5
14
< button class ="btn btn-small btn-inverse " ng-click ="today() "> Today</ button >
6
- < button class ="btn btn-small btn-success " ng-click ="toggleWeeks() "> Toggle Weeks</ button >
15
+ < button class ="btn btn-small btn-inverse " ng-click ="dt = '2009-08-24' "> 2009-08-24</ button >
16
+ < button class ="btn btn-small btn-success " ng-click ="toggleWeeks() " tooltip ="For inline datepicker "> Toggle Weeks</ button >
7
17
< button class ="btn btn-small btn-danger " ng-click ="clear() "> Clear</ button >
8
- < button class ="btn btn-small " ng-click ="toggleMin() "> After today restriction</ button >
18
+ < button class ="btn btn-small " ng-click ="toggleMin() " tooltip =" After today restriction " > Min date </ button >
9
19
</ div >
Original file line number Diff line number Diff line change 1
- var DatepickerDemoCtrl = function ( $scope ) {
1
+ var DatepickerDemoCtrl = function ( $scope , $timeout ) {
2
2
$scope . today = function ( ) {
3
3
$scope . dt = new Date ( ) ;
4
4
} ;
@@ -22,4 +22,15 @@ var DatepickerDemoCtrl = function ($scope) {
22
22
$scope . minDate = ( $scope . minDate ) ? null : new Date ( ) ;
23
23
} ;
24
24
$scope . toggleMin ( ) ;
25
+
26
+ $scope . open = function ( ) {
27
+ $timeout ( function ( ) {
28
+ $scope . opened = true ;
29
+ } ) ;
30
+ } ;
31
+
32
+ $scope . dateOptions = {
33
+ 'year-format' : "'yy'" ,
34
+ 'starting-day' : 1
35
+ } ;
25
36
} ;
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
- < table class =" well well-large " >
1
+ < table >
2
2
< thead >
3
3
< tr class ="text-center ">
4
4
< th > < button type ="button " class ="btn pull-left " ng-click ="move(-1) "> < i class ="icon-chevron-left "> </ i > </ button > </ th >
14
14
< tr ng-repeat ="row in rows ">
15
15
< td ng-show ="showWeekNumbers " class ="text-center "> < em > {{ getWeekNumber(row) }}</ em > </ td >
16
16
< td ng-repeat ="dt in row " class ="text-center ">
17
- < button type ="button " style ="width:100%; " class ="btn " ng-class ="{'btn-info': dt.isSelected } " ng-click ="select(dt.date) " ng-disabled ="dt.disabled "> < span ng-class ="{muted: ! dt.isCurrent } "> {{dt.label}}</ span > </ button >
17
+ < button type ="button " style ="width:100%; " class ="btn " ng-class ="{'btn-info': dt.selected } " ng-click ="select(dt.date) " ng-disabled ="dt.disabled "> < span ng-class ="{muted: dt.secondary } "> {{dt.label}}</ span > </ button >
18
18
</ td >
19
19
</ tr >
20
20
</ tbody >
Original file line number Diff line number Diff line change
1
+ < ul class ="dropdown-menu " ng-style ="{display: (isOpen && 'block') || 'none', top: position.top+'px', left: position.left+'px'} " class ="dropdown-menu ">
2
+ < li ng-transclude > </ li >
3
+ < li class ="divider "> </ li >
4
+ < li style ="padding: 9px; ">
5
+ < span class ="btn-group ">
6
+ < button class ="btn btn-small btn-inverse " ng-click ="today() "> Today</ button >
7
+ < button class ="btn btn-small btn-info " ng-click ="showWeeks = ! showWeeks " ng-class ="{active: showWeeks} "> Weeks</ button >
8
+ < button class ="btn btn-small btn-danger " ng-click ="clear() "> Clear</ button >
9
+ </ span >
10
+ < button class ="btn btn-small btn-success pull-right " ng-click ="isOpen = false "> Close</ button >
11
+ </ li >
12
+ </ ul >
You can’t perform that action at this time.
0 commit comments