Skip to content

Commit 7d077ec

Browse files
committed
Updating to 4.15.35.
1 parent c5c4e7c commit 7d077ec

File tree

7 files changed

+76
-34
lines changed

7 files changed

+76
-34
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ actively maintained and works with [Bootstrap3](http://getbootstrap.com).
1414
Add these lines to your application's Gemfile:
1515
```ruby
1616
gem 'momentjs-rails', '>= 2.9.0'
17-
gem 'bootstrap3-datetimepicker-rails', '~> 4.14.30'
17+
gem 'bootstrap3-datetimepicker-rails', '~> 4.15.35'
1818
```
1919

2020
And then execute:

bootstrap-datetimepicker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bootstrap3Datetimepicker
22
module Rails
3-
VERSION = '4.14.30'
3+
VERSION = '4.15.35'
44
end
55
end

vendor/assets/javascripts/bootstrap-datetimepicker.js

Lines changed: 65 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! version : 4.14.30
1+
/*! version : 4.15.35
22
=========================================================
33
bootstrap-datetimejs
44
https://github.com/Eonasdan/bootstrap-datetimepicker
@@ -285,16 +285,16 @@
285285
getToolbar = function () {
286286
var row = [];
287287
if (options.showTodayButton) {
288-
row.push($('<td>').append($('<a>').attr({'data-action':'today', 'title':'Go to today'}).append($('<span>').addClass(options.icons.today))));
288+
row.push($('<td>').append($('<a>').attr({'data-action':'today', 'title': options.tooltips.today}).append($('<span>').addClass(options.icons.today))));
289289
}
290290
if (!options.sideBySide && hasDate() && hasTime()) {
291291
row.push($('<td>').append($('<a>').attr({'data-action':'togglePicker', 'title':'Select Time'}).append($('<span>').addClass(options.icons.time))));
292292
}
293293
if (options.showClear) {
294-
row.push($('<td>').append($('<a>').attr({'data-action':'clear', 'title':'Clear selection'}).append($('<span>').addClass(options.icons.clear))));
294+
row.push($('<td>').append($('<a>').attr({'data-action':'clear', 'title': options.tooltips.clear}).append($('<span>').addClass(options.icons.clear))));
295295
}
296296
if (options.showClose) {
297-
row.push($('<td>').append($('<a>').attr({'data-action':'close', 'title':'Close the picker'}).append($('<span>').addClass(options.icons.close))));
297+
row.push($('<td>').append($('<a>').attr({'data-action':'close', 'title': options.tooltips.close}).append($('<span>').addClass(options.icons.close))));
298298
}
299299
return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));
300300
},
@@ -316,14 +316,20 @@
316316
if (isEnabled('s') && !use24Hours) {
317317
template.addClass('wider');
318318
}
319+
319320
if (options.sideBySide && hasDate() && hasTime()) {
320321
template.addClass('timepicker-sbs');
322+
if (options.toolbarPlacement === 'top') {
323+
template.append(toolbar);
324+
}
321325
template.append(
322326
$('<div>').addClass('row')
323-
.append(dateView.addClass('col-sm-6'))
324-
.append(timeView.addClass('col-sm-6'))
327+
.append(dateView.addClass('col-md-6'))
328+
.append(timeView.addClass('col-md-6'))
325329
);
326-
template.append(toolbar);
330+
if (options.toolbarPlacement === 'bottom') {
331+
template.append(toolbar);
332+
}
327333
return template;
328334
}
329335

@@ -552,9 +558,9 @@
552558
monthsViewHeader = monthsView.find('th'),
553559
months = monthsView.find('tbody').find('span');
554560

555-
monthsViewHeader.eq(0).find('span').attr('title', 'Previous Year');
556-
monthsViewHeader.eq(1).attr('title', 'Select Year');
557-
monthsViewHeader.eq(2).find('span').attr('title', 'Next Year');
561+
monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);
562+
monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);
563+
monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);
558564

559565
monthsView.find('.disabled').removeClass('disabled');
560566

@@ -587,9 +593,9 @@
587593
endYear = viewDate.clone().add(6, 'y'),
588594
html = '';
589595

590-
yearsViewHeader.eq(0).find('span').attr('title', 'Previous Decade');
591-
yearsViewHeader.eq(1).attr('title', 'Select Decade');
592-
yearsViewHeader.eq(2).find('span').attr('title', 'Next Decade');
596+
yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.nextDecade);
597+
yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);
598+
yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.prevDecade);
593599

594600
yearsView.find('.disabled').removeClass('disabled');
595601

@@ -618,8 +624,8 @@
618624
endDecade = startDecade.clone().add(100, 'y'),
619625
html = '';
620626

621-
decadesViewHeader.eq(0).find('span').attr('title', 'Previous Century');
622-
decadesViewHeader.eq(2).find('span').attr('title', 'Next Century');
627+
decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);
628+
decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);
623629

624630
decadesView.find('.disabled').removeClass('disabled');
625631

@@ -656,9 +662,9 @@
656662
return;
657663
}
658664

659-
daysViewHeader.eq(0).find('span').attr('title', 'Previous Month');
660-
daysViewHeader.eq(1).attr('title', 'Select Month');
661-
daysViewHeader.eq(2).find('span').attr('title', 'Next Month');
665+
daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);
666+
daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);
667+
daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);
662668

663669
daysView.find('.disabled').removeClass('disabled');
664670
daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));
@@ -880,6 +886,9 @@
880886
type: 'dp.hide',
881887
date: date.clone()
882888
});
889+
890+
input.blur();
891+
883892
return picker;
884893
},
885894

@@ -1284,7 +1293,7 @@
12841293
detachDatePickerElementEvents = function () {
12851294
input.off({
12861295
'change': change,
1287-
'blur': hide,
1296+
'blur': blur,
12881297
'keydown': keydown,
12891298
'keyup': keyup,
12901299
'focus': options.allowInputToggle ? hide : ''
@@ -1630,7 +1639,7 @@
16301639
setValue(options.maxDate);
16311640
}
16321641
if (viewDate.isAfter(parsedDate)) {
1633-
viewDate = parsedDate.clone();
1642+
viewDate = parsedDate.clone().subtract(options.stepping, 'm');
16341643
}
16351644
update();
16361645
return picker;
@@ -1666,7 +1675,7 @@
16661675
setValue(options.minDate);
16671676
}
16681677
if (viewDate.isBefore(parsedDate)) {
1669-
viewDate = parsedDate.clone();
1678+
viewDate = parsedDate.clone().add(options.stepping, 'm');
16701679
}
16711680
update();
16721681
return picker;
@@ -1798,6 +1807,22 @@
17981807
return picker;
17991808
};
18001809

1810+
picker.tooltips = function (tooltips) {
1811+
if (arguments.length === 0) {
1812+
return $.extend({}, options.tooltips);
1813+
}
1814+
1815+
if (!(tooltips instanceof Object)) {
1816+
throw new TypeError('tooltips() expects parameter to be an Object');
1817+
}
1818+
$.extend(options.tooltips, tooltips);
1819+
if (widget) {
1820+
hide();
1821+
show();
1822+
}
1823+
return picker;
1824+
};
1825+
18011826
picker.useStrict = function (useStrict) {
18021827
if (arguments.length === 0) {
18031828
return options.useStrict;
@@ -2236,7 +2261,7 @@
22362261
if (element.hasClass('input-group')) {
22372262
// in case there is more then one 'input-group-addon' Issue #48
22382263
if (element.find('.datepickerbutton').size() === 0) {
2239-
component = element.find('[class^="input-group-"]');
2264+
component = element.find('.input-group-addon');
22402265
} else {
22412266
component = element.find('.datepickerbutton');
22422267
}
@@ -2310,6 +2335,22 @@
23102335
clear: 'glyphicon glyphicon-trash',
23112336
close: 'glyphicon glyphicon-remove'
23122337
},
2338+
tooltips: {
2339+
today: 'Go to today',
2340+
clear: 'Clear selection',
2341+
close: 'Close the picker',
2342+
selectMonth: 'Select Month',
2343+
prevMonth: 'Previous Month',
2344+
nextMonth: 'Next Month',
2345+
selectYear: 'Select Year',
2346+
prevYear: 'Previous Year',
2347+
nextYear: 'Next Year',
2348+
selectDecade: 'Select Decade',
2349+
prevDecade: 'Previous Decade',
2350+
nextDecade: 'Next Decade',
2351+
prevCentury: 'Previous Century',
2352+
nextCentury: 'Next Century'
2353+
},
23132354
useStrict: false,
23142355
sideBySide: false,
23152356
daysOfWeekDisabled: false,
@@ -2339,7 +2380,7 @@
23392380
if (widget.find('.datepicker').is(':visible')) {
23402381
this.date(d.clone().subtract(7, 'd'));
23412382
} else {
2342-
this.date(d.clone().add(1, 'm'));
2383+
this.date(d.clone().add(this.stepping(), 'm'));
23432384
}
23442385
},
23452386
down: function (widget) {
@@ -2351,7 +2392,7 @@
23512392
if (widget.find('.datepicker').is(':visible')) {
23522393
this.date(d.clone().add(7, 'd'));
23532394
} else {
2354-
this.date(d.clone().subtract(1, 'm'));
2395+
this.date(d.clone().subtract(this.stepping(), 'm'));
23552396
}
23562397
},
23572398
'control up': function (widget) {

vendor/assets/javascripts/bootstrap-datetimepicker.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/assets/stylesheets/bootstrap-datetimepicker.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Datetimepicker for Bootstrap 3
3-
* version : 4.14.30
3+
* version : 4.15.35
44
* https://github.com/Eonasdan/bootstrap-datetimepicker/
55
*/
66
.bootstrap-datetimepicker-widget {
@@ -299,7 +299,8 @@
299299
.bootstrap-datetimepicker-widget table td.today:before {
300300
content: '';
301301
display: inline-block;
302-
border: 0 0 7px 7px solid transparent;
302+
border: solid transparent;
303+
border-width: 0 0 7px 7px;
303304
border-bottom-color: #337ab7;
304305
border-top-color: rgba(0, 0, 0, 0.2);
305306
position: absolute;

0 commit comments

Comments
 (0)