Skip to content

Commit 92dc99c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents c1d29fe + 99b6f8d commit 92dc99c

37 files changed

+655
-363
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ contributed to by him (yet?)
1010

1111
Attached to a field with the format specified via options:
1212

13-
<input type="text" value="02-16-2012" id="datepicker">
13+
<input type="text" value="02-16-2012" id="datepicker">
1414
######
1515
$('#datepicker').datepicker({
1616
format: 'mm-dd-yyyy'
@@ -140,6 +140,18 @@ Number, String. Default: 0, 'month'
140140

141141
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.
142142

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+
143155
### keyboardNavigation
144156

145157
Boolean. Default: true
@@ -284,7 +296,8 @@ The plugin supports i18n for the month and weekday names and the `weekStart` opt
284296
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
285297
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
286298
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
287-
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
299+
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
300+
today: "Today"
288301
};
289302

290303
If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add `charset="UTF-8"` to your `script` tag:

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

1617
// Mixins
1718

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,
@@ -80,6 +79,55 @@
8079
color: #999999;
8180
cursor: default;
8281
}
82+
.datepicker td.today,
83+
.datepicker td.today:hover,
84+
.datepicker td.today.disabled,
85+
.datepicker td.today.disabled:hover {
86+
background-color: #fde19a;
87+
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
88+
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
89+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
90+
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
91+
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
92+
background-image: linear-gradient(top, #fdd49a, #fdf59a);
93+
background-repeat: repeat-x;
94+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
95+
border-color: #fdf59a #fdf59a #fbed50;
96+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
97+
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
98+
}
99+
.datepicker td.today:hover,
100+
.datepicker td.today:hover:hover,
101+
.datepicker td.today.disabled:hover,
102+
.datepicker td.today.disabled:hover:hover,
103+
.datepicker td.today:active,
104+
.datepicker td.today:hover:active,
105+
.datepicker td.today.disabled:active,
106+
.datepicker td.today.disabled:hover:active,
107+
.datepicker td.today.active,
108+
.datepicker td.today:hover.active,
109+
.datepicker td.today.disabled.active,
110+
.datepicker td.today.disabled:hover.active,
111+
.datepicker td.today.disabled,
112+
.datepicker td.today:hover.disabled,
113+
.datepicker td.today.disabled.disabled,
114+
.datepicker td.today.disabled:hover.disabled,
115+
.datepicker td.today[disabled],
116+
.datepicker td.today:hover[disabled],
117+
.datepicker td.today.disabled[disabled],
118+
.datepicker td.today.disabled:hover[disabled] {
119+
background-color: #fdf59a;
120+
}
121+
.datepicker td.today:active,
122+
.datepicker td.today:hover:active,
123+
.datepicker td.today.disabled:active,
124+
.datepicker td.today.disabled:hover:active,
125+
.datepicker td.today.active,
126+
.datepicker td.today:hover.active,
127+
.datepicker td.today.disabled.active,
128+
.datepicker td.today.disabled:hover.active {
129+
background-color: #fbf069 \9;
130+
}
83131
.datepicker td.active,
84132
.datepicker td.active:hover,
85133
.datepicker td.active.disabled,
@@ -133,11 +181,11 @@
133181
}
134182
.datepicker td span {
135183
display: block;
136-
width: 47px;
184+
width: 23%;
137185
height: 54px;
138186
line-height: 54px;
139187
float: left;
140-
margin: 2px;
188+
margin: 1%;
141189
cursor: pointer;
142190
-webkit-border-radius: 4px;
143191
-moz-border-radius: 4px;
@@ -209,10 +257,12 @@
209257
.datepicker th.switch {
210258
width: 145px;
211259
}
212-
.datepicker thead tr:first-child th {
260+
.datepicker thead tr:first-child th,
261+
.datepicker tfoot tr:first-child th {
213262
cursor: pointer;
214263
}
215-
.datepicker thead tr:first-child th:hover {
264+
.datepicker thead tr:first-child th:hover,
265+
.datepicker tfoot tr:first-child th:hover {
216266
background: #eeeeee;
217267
}
218268
.input-append.date .add-on i,

0 commit comments

Comments
 (0)