Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 78d40cf

Browse files
committed
Merge pull request #29 from 720kb/ui-bootstrap-compatibility
Now datepicker restric:AEC, for ui-bootstrap the only way is to use C
2 parents 52292df + b499759 commit 78d40cf

File tree

18 files changed

+147
-14
lines changed

18 files changed

+147
-14
lines changed

assets/.DS_Store

6 KB
Binary file not shown.

assets/js/.DS_Store

6 KB
Binary file not shown.

config/csslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"text-indent": false,
3232
"unique-headings": false,
3333
"universal-selector": false,
34-
"unqualified-attributes": true,
34+
"unqualified-attributes": false,
3535
"vendor-prefix": true,
3636
"zero-units": true
3737
}

index.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,28 @@
1818
<body>
1919
<div class="separator50"></div>
2020
<div class="col6 offset-left2">
21-
<div class="col5">
22-
<datepicker
21+
<div class="col3">
22+
<div datepicker>
23+
<input ng-model="date1" type="text" class="angular-datepicker-input"/>
24+
</div>
25+
Date 1 is: {{date1}}
26+
</div>
27+
<div class="col3">
28+
<div class="datepicker"
2329
date-format="MMMM d, y"
2430
date-min-limit="2014/09/07"
2531
date-max-limit="2018/09/07"
2632
button-prev='<i class="fa fa-arrow-circle-left"></i>'
2733
button-next='<i class="fa fa-arrow-circle-right"></i>'>
28-
<input ng-model="date1" type="text" class="angular-datepicker-input"/>
29-
</datepicker>
30-
Date 1 is: {{date1}}
34+
<input ng-model="date2" type="text" class="angular-datepicker-input"/>
35+
</div>
36+
Date 2 is: {{date2}}
3137
</div>
32-
<div class="col5">
38+
<div class="col3">
3339
<datepicker>
34-
<input ng-model="date2" type="text" class="angular-datepicker-input"/>
40+
<input ng-model="date3" type="text" class="angular-datepicker-input"/>
3541
</datepicker>
36-
Date 2 is: {{date2}}
42+
Date 3 is: {{date3}}
3743
</div>
3844
</div>
3945
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.4/angular.min.js"></script>

src/css/angular-datepicker.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
datepicker a{
1+
datepicker a, [datepicker] a, .datepicker a{
22
color:inherit;
33
text-decoration:none;
44
}
5-
datepicker a:hover{
5+
datepicker a:hover, [datepicker] a:hover, .datepicker a:hover{
66
text-decoration:none;
77
}
8-
datepicker select,datepicker select:focus,datepicker select:hover{
8+
datepicker select, datepicker select:focus, datepicker select:hover,
9+
.datepicker select, .datepicker select:focus, .datepicker select:hover
10+
[datepicker] select, [datepicker] select:focus, [datepicker] select:hover{
911
width:100%;
1012
overflow: hidden;
1113
background:none;
@@ -15,7 +17,7 @@ datepicker select,datepicker select:focus,datepicker select:hover{
1517
height: 30px;
1618
border-radius:2px;
1719
}
18-
datepicker,
20+
datepicker, .datepicker, [datepicker],
1921
._720kb-datepicker-calendar-header,
2022
._720kb-datepicker-calendar-body,
2123
._720kb-datepicker-calendar-days-header,

src/js/angular-datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
var A_DAY_IN_MILLISECONDS = 86400000;
1111
return {
12-
'restrict': 'E',
12+
'restrict': 'AEC',
1313
'scope': {
1414
'dateSet': '@',
1515
'dateMinLimit': '@',

ui-bootstrap/.DS_Store

6 KB
Binary file not shown.

ui-bootstrap/assets/.DS_Store

6 KB
Binary file not shown.

ui-bootstrap/assets/js/.DS_Store

6 KB
Binary file not shown.

ui-bootstrap/assets/js/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*global angular*/
2+
3+
(function (angular) {
4+
'use strict';
5+
6+
angular.module('720kb', [
7+
'ngRoute',
8+
'ui.bootstrap',
9+
'720kb.datepicker'
10+
]);
11+
}(angular));

0 commit comments

Comments
 (0)