Skip to content

Commit aa5f114

Browse files
committed
Merge latest master into range branch
2 parents fdd23a3 + dfb6b64 commit aa5f114

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4463
-209
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
instrumented/
2+
tests/coverage.html

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
instrumented/
2+
tests/coverage.html

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Home
22

3-
http://www.eyecon.ro/bootstrap-datepicker/
3+
This is a fork of Stefan Petre's [original code](http://www.eyecon.ro/bootstrap-datepicker/);
4+
thanks go to him for getting this thing started!
5+
6+
Please note that this fork is not used on Stefan's page at this time, nor is it maintained or
7+
contributed to by him (yet?)
48

59
# Example
610

711
Attached to a field with the format specified via options:
812

9-
<input type="text" value="02-16-2012" id="datepicker">
13+
<input type="text" value="02-16-2012" id="datepicker">
1014
######
1115
$('#datepicker').datepicker({
1216
format: 'mm-dd-yyyy'
@@ -104,7 +108,7 @@ All options that take a "Date" can handle a `Date` object; a String formatted ac
104108

105109
String. Default: 'mm/dd/yyyy'
106110

107-
The date format, combination of d, dd, m, mm, M, MM, yy, yyy.
111+
The date format, combination of d, dd, m, mm, M, MM, yy, yyyy.
108112

109113
### weekStart
110114

@@ -136,6 +140,24 @@ Number, String. Default: 0, 'month'
136140

137141
The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers.
138142

143+
### todayBtn
144+
145+
Boolean, "linked". Default: false
146+
147+
If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected.
148+
149+
### todayHighlight
150+
151+
Boolean. Default: false
152+
153+
If true, highlights the current date.
154+
155+
### keyboardNavigation
156+
157+
Boolean. Default: true
158+
159+
Whether or not to allow date navigation by arrow keys.
160+
139161
### language
140162

141163
String. Default: 'en'
@@ -244,6 +266,14 @@ Fired when the date is changed.
244266
}
245267
});
246268

269+
### changeYear
270+
271+
Fired when the *view* year is changed from decade view.
272+
273+
### changeMonth
274+
275+
Fired when the *view* month is changed from year view.
276+
247277
## Keyboard support
248278

249279
The datepicker includes some keyboard navigation:

build/build.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@white: #fff;
1313
@linkColor: #08c;
1414
@btnPrimaryBackground: @linkColor;
15+
@orange: #f89406;
1516
@baseLineHeight: 18px;
1617

1718
// Mixins

css/datepicker.css

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
display: block;
5555
}
5656
.datepicker table {
57-
width: 100%;
5857
margin: 0;
5958
}
6059
.datepicker td,
@@ -130,6 +129,55 @@
130129
.datepicker td.selected.disabled:hover[disabled] {
131130
background-color: #808080;
132131
}
132+
.datepicker td.today,
133+
.datepicker td.today:hover,
134+
.datepicker td.today.disabled,
135+
.datepicker td.today.disabled:hover {
136+
background-color: #fde19a;
137+
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
138+
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
139+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
140+
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
141+
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
142+
background-image: linear-gradient(top, #fdd49a, #fdf59a);
143+
background-repeat: repeat-x;
144+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
145+
border-color: #fdf59a #fdf59a #fbed50;
146+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
147+
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
148+
}
149+
.datepicker td.today:hover,
150+
.datepicker td.today:hover:hover,
151+
.datepicker td.today.disabled:hover,
152+
.datepicker td.today.disabled:hover:hover,
153+
.datepicker td.today:active,
154+
.datepicker td.today:hover:active,
155+
.datepicker td.today.disabled:active,
156+
.datepicker td.today.disabled:hover:active,
157+
.datepicker td.today.active,
158+
.datepicker td.today:hover.active,
159+
.datepicker td.today.disabled.active,
160+
.datepicker td.today.disabled:hover.active,
161+
.datepicker td.today.disabled,
162+
.datepicker td.today:hover.disabled,
163+
.datepicker td.today.disabled.disabled,
164+
.datepicker td.today.disabled:hover.disabled,
165+
.datepicker td.today[disabled],
166+
.datepicker td.today:hover[disabled],
167+
.datepicker td.today.disabled[disabled],
168+
.datepicker td.today.disabled:hover[disabled] {
169+
background-color: #fdf59a;
170+
}
171+
.datepicker td.today:active,
172+
.datepicker td.today:hover:active,
173+
.datepicker td.today.disabled:active,
174+
.datepicker td.today.disabled:hover:active,
175+
.datepicker td.today.active,
176+
.datepicker td.today:hover.active,
177+
.datepicker td.today.disabled.active,
178+
.datepicker td.today.disabled:hover.active {
179+
background-color: #fbf069 \9;
180+
}
133181
.datepicker td.selected:active,
134182
.datepicker td.selected:hover:active,
135183
.datepicker td.selected.disabled:active,
@@ -193,11 +241,11 @@
193241
}
194242
.datepicker td span {
195243
display: block;
196-
width: 47px;
244+
width: 23%;
197245
height: 54px;
198246
line-height: 54px;
199247
float: left;
200-
margin: 2px;
248+
margin: 1%;
201249
cursor: pointer;
202250
-webkit-border-radius: 4px;
203251
-moz-border-radius: 4px;
@@ -269,10 +317,12 @@
269317
.datepicker th.switch {
270318
width: 145px;
271319
}
272-
.datepicker thead tr:first-child th {
320+
.datepicker thead tr:first-child th,
321+
.datepicker tfoot tr:first-child th {
273322
cursor: pointer;
274323
}
275-
.datepicker thead tr:first-child th:hover {
324+
.datepicker thead tr:first-child th:hover,
325+
.datepicker tfoot tr:first-child th:hover {
276326
background: #eeeeee;
277327
}
278328
.input-append.date .add-on i,

0 commit comments

Comments
 (0)