Skip to content

Commit 11dbeb0

Browse files
committed
Merge pull request rorymadden#8 from petermelias/master
general refactor: fixes rorymadden#2 rorymadden#4 and rorymadden#5
2 parents 3f2aa14 + 85150a7 commit 11dbeb0

File tree

8 files changed

+261
-16880
lines changed

8 files changed

+261
-16880
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
bower_components
3+
npm-debug.log

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-date-dropdowns",
3-
"version": "0.1.1",
3+
"version": "0.2.0",
44
"main": "directive.js",
55
"ignore": [
66
"**/.*",
@@ -10,4 +10,4 @@
1010
"dependencies": {
1111
"angular": "~1.2.1"
1212
}
13-
}
13+
}

demo/app.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(function () {
2+
'use strict';
3+
4+
var app = angular.module('demo', [
5+
'rorymadden.date-dropdowns'
6+
]);
7+
8+
app.controller('TestCtrl', function ($scope) {
9+
10+
$scope.testData = {
11+
blankDate: null,
12+
realDate: new Date("September 30, 2010 15:30:00")
13+
};
14+
});
15+
16+
}());

demo/index.htm

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js" type="text/javascript"></script>
5+
<script type="text/javascript" src="lib.js"></script>
6+
<script type="text/javascript" src="app.js"></script>
7+
8+
<style type="text/css">
9+
.container {
10+
width: 200px;
11+
margin: 0 auto;
12+
}
13+
14+
li {
15+
padding-bottom: 20px;
16+
}
17+
18+
select {
19+
width: 100%;
20+
}
21+
22+
.day-container {
23+
border: 2px solid red;
24+
padding: 3px;
25+
}
26+
27+
.day-selector {
28+
background-color: black;
29+
color: white;
30+
}
31+
32+
.month-container {
33+
border: 2px solid blue;
34+
padding: 3px;
35+
}
36+
37+
.month-selector {
38+
background-color: orange;
39+
color: blue;
40+
}
41+
42+
.year-container {
43+
border: 2px solid green;
44+
padding: 3px;
45+
}
46+
47+
.year-selector {
48+
background-color: purple;
49+
color: orange;
50+
}
51+
</style>
52+
</head>
53+
54+
<body ng-app="demo">
55+
<div class="container" ng-controller="TestCtrl">
56+
<ul style="list-style: none; padding: 0; margin: 0;">
57+
<li>
58+
<input rsmdatedropdowns ng-model="testData.blankDate" />
59+
</li>
60+
<li>
61+
<input rsmdatedropdowns ng-model="testData.realDate" />
62+
</li>
63+
<li>
64+
<input rsmdatedropdowns ng-model="testData.realDate" day-div-class="day-container" day-class="day-selector" />
65+
</li>
66+
<li>
67+
<input rsmdatedropdowns ng-model="testData.realDate" month-div-class="month-container" month-class="month-selector" />
68+
</li>
69+
<li>
70+
<input rsmdatedropdowns ng-model="testData.realDate" year-div-class="year-container" year-class="year-selector" />
71+
</li>
72+
<li>
73+
<input rsmdatedropdowns ng-model="testData.realDate" day-div-class="day-container" day-class="day-selector" month-div-class="month-container" month-class="month-selector" year-div-class="year-container" year-class="year-selector" />
74+
</li>
75+
</div>
76+
</body>
77+
</html>

demo/lib.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../directive.js

0 commit comments

Comments
 (0)