Skip to content

Commit 07080bf

Browse files
author
Eonasdan
committed
5.0.0-alpha.15
1 parent 374945f commit 07080bf

17 files changed

Lines changed: 156 additions & 62 deletions

build/css/tempusdominus-bootstrap-4.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*@preserve
2-
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
3-
* Copyright 2016-2017 Jonathan Peterson
2+
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
3+
* Copyright 2016-2018 Jonathan Peterson
44
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
55
*/
66

build/css/tempusdominus-bootstrap-4.min.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*@preserve
2-
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
3-
* Copyright 2016-2017 Jonathan Peterson
2+
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
3+
* Copyright 2016-2018 Jonathan Peterson
44
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
55
*/
66

build/js/tempusdominus-bootstrap-4.js

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*@preserve
2-
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
3-
* Copyright 2016-2017 Jonathan Peterson
2+
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
3+
* Copyright 2016-2018 Jonathan Peterson
44
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
55
*/
66

@@ -1632,10 +1632,9 @@ var TempusDominusBootstrap4 = function ($) {
16321632

16331633
TempusDominusBootstrap4.prototype._init = function _init() {
16341634
if (this._element.hasClass('input-group')) {
1635-
// in case there is more then one 'input-group-addon' Issue #48
16361635
var datepickerButton = this._element.find('.datepickerbutton');
16371636
if (datepickerButton.length === 0) {
1638-
this.component = this._element.find('.input-group-append');
1637+
this.component = this._element.find('[data-toggle="datetimepicker"]');
16391638
} else {
16401639
this.component = datepickerButton;
16411640
}
@@ -1749,24 +1748,32 @@ var TempusDominusBootstrap4 = function ($) {
17491748
var row = [];
17501749
if (this._options.buttons.showToday) {
17511750
row.push($('<td>').append($('<a>').attr({
1751+
href: '#',
1752+
tabindex: '-1',
17521753
'data-action': 'today',
17531754
'title': this._options.tooltips.today
17541755
}).append($('<span>').addClass(this._options.icons.today))));
17551756
}
17561757
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
17571758
row.push($('<td>').append($('<a>').attr({
1759+
href: '#',
1760+
tabindex: '-1',
17581761
'data-action': 'togglePicker',
17591762
'title': this._options.tooltips.selectTime
17601763
}).append($('<span>').addClass(this._options.icons.time))));
17611764
}
17621765
if (this._options.buttons.showClear) {
17631766
row.push($('<td>').append($('<a>').attr({
1767+
href: '#',
1768+
tabindex: '-1',
17641769
'data-action': 'clear',
17651770
'title': this._options.tooltips.clear
17661771
}).append($('<span>').addClass(this._options.icons.clear))));
17671772
}
17681773
if (this._options.buttons.showClose) {
17691774
row.push($('<td>').append($('<a>').attr({
1775+
href: '#',
1776+
tabindex: '-1',
17701777
'data-action': 'close',
17711778
'title': this._options.tooltips.close
17721779
}).append($('<span>').addClass(this._options.icons.close))));
@@ -2405,20 +2412,35 @@ var TempusDominusBootstrap4 = function ($) {
24052412
}
24062413
}
24072414
this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
2408-
this._doAction(e, 'showPicker');
2415+
if (!this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
2416+
this.hide();
2417+
} else {
2418+
this._doAction(e, 'showPicker');
2419+
}
24092420
break;
24102421
}
24112422
case 'selectMinute':
24122423
this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2413-
this._doAction(e, 'showPicker');
2424+
if (!this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
2425+
this.hide();
2426+
} else {
2427+
this._doAction(e, 'showPicker');
2428+
}
24142429
break;
24152430
case 'selectSecond':
24162431
this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2417-
this._doAction(e, 'showPicker');
2432+
if (!this._options.keepOpen && !this._options.inline) {
2433+
this.hide();
2434+
} else {
2435+
this._doAction(e, 'showPicker');
2436+
}
24182437
break;
24192438
case 'clear':
24202439
this.clear();
24212440
break;
2441+
case 'close':
2442+
this.hide();
2443+
break;
24222444
case 'today':
24232445
{
24242446
var todaysDate = this.getMoment();

build/js/tempusdominus-bootstrap-4.min.js

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tempusdominus/bootstrap-4",
33
"type": "component",
4-
"version": "5.0.0-alpha14",
4+
"version": "5.0.0-alpha15",
55
"description": "Date/time picker widget based on twitter bootstrap",
66
"keywords": [
77
"bootstrap",

docs/Installing/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,13 @@ <h3 id="tempusdominusbootstrap4"><a href="https://www.nuget.org/packages/Tempus.
176176
</code></pre>
177177

178178
<h3 id="rails">Rails</h3>
179-
<p>Need new wrapper for this version.</p>
179+
<p>Rails 5.1 Support - <a href="https://github.com/Bialogs/bootstrap4-datetime-picker-rails">Bootstrap 4 Datetime Picker Rails</a></p>
180+
<ol>
181+
<li>Add <code>gem 'bootstrap4-datetime-picker-rails'</code> to your <code>Gemfile</code></li>
182+
<li>Execute <code>bundle</code></li>
183+
<li>Add <code>//= require tempusdominus-bootstrap-4.js</code> to your <code>application.js</code></li>
184+
<li>Add <code>@import "tempusdominus-bootstrap-4.css"</code> to your <code>application.scss</code></li>
185+
</ol>
180186
<h3 id="angular-wrapper">Angular Wrapper</h3>
181187
<p>Need new wrapper for this version.</p>
182188
<h3 id="meteorjs">Meteor.js</h3>
@@ -185,7 +191,7 @@ <h2 id="manual">Manual</h2>
185191
<ol>
186192
<li>Acquire <a href="http://jquery.com">jQuery</a></li>
187193
<li>Acquire <a href="https://github.com/moment/moment">Moment.js</a></li>
188-
<li>Acquire </li>
194+
<li>Acquire</li>
189195
</ol>
190196
<pre><code class="html">&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
191197
&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/moment.js&quot;&gt;&lt;/script&gt;

docs/css/tempusdominus-bootstrap-4.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*@preserve
2-
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
3-
* Copyright 2016-2017 Jonathan Peterson
2+
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
3+
* Copyright 2016-2018 Jonathan Peterson
44
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
55
*/
66

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h1 class="mb-3">Tempus Dominus</h1>
139139
<a href="Installing/" class="btn btn-lg btn-outline-secondary">Download</a>
140140
</div>
141141
<p class="text-muted mb-0">
142-
Currently v5.0.0-alpha.14
142+
Currently v5.0.0-alpha.15
143143
</p>
144144
</div>
145145
</div>

docs/js/tempusdominus-bootstrap-4.js

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*@preserve
2-
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
3-
* Copyright 2016-2017 Jonathan Peterson
2+
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
3+
* Copyright 2016-2018 Jonathan Peterson
44
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
55
*/
66

@@ -1632,10 +1632,9 @@ var TempusDominusBootstrap4 = function ($) {
16321632

16331633
TempusDominusBootstrap4.prototype._init = function _init() {
16341634
if (this._element.hasClass('input-group')) {
1635-
// in case there is more then one 'input-group-addon' Issue #48
16361635
var datepickerButton = this._element.find('.datepickerbutton');
16371636
if (datepickerButton.length === 0) {
1638-
this.component = this._element.find('.input-group-append');
1637+
this.component = this._element.find('[data-toggle="datetimepicker"]');
16391638
} else {
16401639
this.component = datepickerButton;
16411640
}
@@ -1749,24 +1748,32 @@ var TempusDominusBootstrap4 = function ($) {
17491748
var row = [];
17501749
if (this._options.buttons.showToday) {
17511750
row.push($('<td>').append($('<a>').attr({
1751+
href: '#',
1752+
tabindex: '-1',
17521753
'data-action': 'today',
17531754
'title': this._options.tooltips.today
17541755
}).append($('<span>').addClass(this._options.icons.today))));
17551756
}
17561757
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
17571758
row.push($('<td>').append($('<a>').attr({
1759+
href: '#',
1760+
tabindex: '-1',
17581761
'data-action': 'togglePicker',
17591762
'title': this._options.tooltips.selectTime
17601763
}).append($('<span>').addClass(this._options.icons.time))));
17611764
}
17621765
if (this._options.buttons.showClear) {
17631766
row.push($('<td>').append($('<a>').attr({
1767+
href: '#',
1768+
tabindex: '-1',
17641769
'data-action': 'clear',
17651770
'title': this._options.tooltips.clear
17661771
}).append($('<span>').addClass(this._options.icons.clear))));
17671772
}
17681773
if (this._options.buttons.showClose) {
17691774
row.push($('<td>').append($('<a>').attr({
1775+
href: '#',
1776+
tabindex: '-1',
17701777
'data-action': 'close',
17711778
'title': this._options.tooltips.close
17721779
}).append($('<span>').addClass(this._options.icons.close))));
@@ -2405,20 +2412,35 @@ var TempusDominusBootstrap4 = function ($) {
24052412
}
24062413
}
24072414
this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
2408-
this._doAction(e, 'showPicker');
2415+
if (!this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
2416+
this.hide();
2417+
} else {
2418+
this._doAction(e, 'showPicker');
2419+
}
24092420
break;
24102421
}
24112422
case 'selectMinute':
24122423
this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2413-
this._doAction(e, 'showPicker');
2424+
if (!this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
2425+
this.hide();
2426+
} else {
2427+
this._doAction(e, 'showPicker');
2428+
}
24142429
break;
24152430
case 'selectSecond':
24162431
this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
2417-
this._doAction(e, 'showPicker');
2432+
if (!this._options.keepOpen && !this._options.inline) {
2433+
this.hide();
2434+
} else {
2435+
this._doAction(e, 'showPicker');
2436+
}
24182437
break;
24192438
case 'clear':
24202439
this.clear();
24212440
break;
2441+
case 'close':
2442+
this.hide();
2443+
break;
24222444
case 'today':
24232445
{
24242446
var todaysDate = this.getMoment();

docs/mkdocs/search_index.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"docs": [
33
{
44
"location": "/",
5-
"text": "Tempus Dominus\n\n \n\n Tempus Dominus is the successor to the very popular Eonasdan/bootstrap-datetimepicker. \n The plugin provide a robust date and time picker designed to integrate into your Bootstrap project.\n \n\n \n\n \nGet started\n\n \nDownload\n\n \n\n \n\n Currently v5.0.0-alpha.14\n \n\n \n\n \n\n \n\n\n\n\n\n \n\n \n\n \nInstallation\n\n \nInclude Tempus Dominus's source Sass and JavaScript files via npm\n\n \n\n\n\nnpm i tempusdominus-bootstrap-4\n\n\n \n\n \n\n \nRead installation docs\n\n \n\n \n\n \n\n \nCDNJS\n\n \nWhen you only need to include Tempus Dominus's compiled CSS or JS, you can use CDNJS.\n\n \n\n\n\n\nscript type=\ntext/javascript\n src=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/js/tempusdominus-bootstrap-4.min.js\n/script\n\n\nlink rel=\nstylesheet\n href=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/css/tempusdominus-bootstrap-4.min.css\n /\n\n\n\n \n\n \n\n \nExplore the docs",
5+
"text": "Tempus Dominus\n\n \n\n Tempus Dominus is the successor to the very popular Eonasdan/bootstrap-datetimepicker. \n The plugin provide a robust date and time picker designed to integrate into your Bootstrap project.\n \n\n \n\n \nGet started\n\n \nDownload\n\n \n\n \n\n Currently v5.0.0-alpha.15\n \n\n \n\n \n\n \n\n\n\n\n\n \n\n \n\n \nInstallation\n\n \nInclude Tempus Dominus's source Sass and JavaScript files via npm\n\n \n\n\n\nnpm i tempusdominus-bootstrap-4\n\n\n \n\n \n\n \nRead installation docs\n\n \n\n \n\n \n\n \nCDNJS\n\n \nWhen you only need to include Tempus Dominus's compiled CSS or JS, you can use CDNJS.\n\n \n\n\n\n\nscript type=\ntext/javascript\n src=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/js/tempusdominus-bootstrap-4.min.js\n/script\n\n\nlink rel=\nstylesheet\n href=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/css/tempusdominus-bootstrap-4.min.css\n /\n\n\n\n \n\n \n\n \nExplore the docs",
66
"title": "Tempus Dominus Bootstrap 4"
77
},
88
{
@@ -152,7 +152,7 @@
152152
},
153153
{
154154
"location": "/Installing/",
155-
"text": "This guide still needs a lot of work\n\n\n\n\nMinimal Requirements\n\n\n\n\njQuery\n\n\nMoment.js\n\n\nLocales: Moment's locale files are \nhere\n\n\n\n\nInstallation Guides\n\n\n\n\nCDN\n\n\nNuget\n\n\nRails\n\n\nAngular\n\n\nMeteor.js\n\n\nManual\n\n\n\n\nCDN\n\n\nhead\n\n \nscript type=\ntext/javascript\n src=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/js/tempusdominus-bootstrap-4.min.js\n/script\n\n \nlink rel=\nstylesheet\n href=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/css/tempusdominus-bootstrap-4.min.css\n /\n\n\n/head\n\n\n\n\n\nPackage Managers\n\n\nNuget\n\n\nTempus.Dominus.Bootstrap.4\n: \n\n\nPM\n Install-Package Tempus.Dominus.Bootstrap.4\n\n\n\nhead\n\n \nscript type=\ntext/javascript\n src=\n/scripts/jquery.min.js\n/script\n\n \nscript type=\ntext/javascript\n src=\n/scripts/moment.min.js\n/script\n\n \nscript type=\ntext/javascript\n src=\n/scripts/tempusdominus/tempusdominus-bootstrap-4.js\n/script\n\n\n/head\n\n\n\n\n\nRails\n\n\nNeed new wrapper for this version.\n\n\nAngular Wrapper\n\n\nNeed new wrapper for this version.\n\n\nMeteor.js\n\n\nNeed new wrapper for this version.\n\n\nManual\n\n\n\n\nAcquire \njQuery\n\n\nAcquire \nMoment.js\n\n\nAcquire \n\n\n\n\nscript type=\ntext/javascript\n src=\n/path/to/jquery.js\n/script\n\n\nscript type=\ntext/javascript\n src=\n/path/to/moment.js\n/script\n\n\nscript type=\ntext/javascript\n src=\n/path/to/tempusdominus-bootstrap-4.min.js\n/script\n\n\n\n\n\nKnockout\n\n\nNeed new wrapper for this version.",
155+
"text": "This guide still needs a lot of work\n\n\n\n\nMinimal Requirements\n\n\n\n\njQuery\n\n\nMoment.js\n\n\nLocales: Moment's locale files are \nhere\n\n\n\n\nInstallation Guides\n\n\n\n\nCDN\n\n\nNuget\n\n\nRails\n\n\nAngular\n\n\nMeteor.js\n\n\nManual\n\n\n\n\nCDN\n\n\nhead\n\n \nscript type=\ntext/javascript\n src=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/js/tempusdominus-bootstrap-4.min.js\n/script\n\n \nlink rel=\nstylesheet\n href=\nhttps://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/css/tempusdominus-bootstrap-4.min.css\n /\n\n\n/head\n\n\n\n\n\nPackage Managers\n\n\nNuget\n\n\nTempus.Dominus.Bootstrap.4\n: \n\n\nPM\n Install-Package Tempus.Dominus.Bootstrap.4\n\n\n\nhead\n\n \nscript type=\ntext/javascript\n src=\n/scripts/jquery.min.js\n/script\n\n \nscript type=\ntext/javascript\n src=\n/scripts/moment.min.js\n/script\n\n \nscript type=\ntext/javascript\n src=\n/scripts/tempusdominus/tempusdominus-bootstrap-4.js\n/script\n\n\n/head\n\n\n\n\n\nRails\n\n\nRails 5.1 Support - \nBootstrap 4 Datetime Picker Rails\n\n\n\n\nAdd \ngem 'bootstrap4-datetime-picker-rails'\n to your \nGemfile\n\n\nExecute \nbundle\n\n\nAdd \n//= require tempusdominus-bootstrap-4.js\n to your \napplication.js\n\n\nAdd \n@import \"tempusdominus-bootstrap-4.css\"\n to your \napplication.scss\n\n\n\n\nAngular Wrapper\n\n\nNeed new wrapper for this version.\n\n\nMeteor.js\n\n\nNeed new wrapper for this version.\n\n\nManual\n\n\n\n\nAcquire \njQuery\n\n\nAcquire \nMoment.js\n\n\nAcquire\n\n\n\n\nscript type=\ntext/javascript\n src=\n/path/to/jquery.js\n/script\n\n\nscript type=\ntext/javascript\n src=\n/path/to/moment.js\n/script\n\n\nscript type=\ntext/javascript\n src=\n/path/to/tempusdominus-bootstrap-4.min.js\n/script\n\n\n\n\n\nKnockout\n\n\nNeed new wrapper for this version.",
156156
"title": "Installing"
157157
},
158158
{
@@ -187,7 +187,7 @@
187187
},
188188
{
189189
"location": "/Installing/#rails",
190-
"text": "Need new wrapper for this version.",
190+
"text": "Rails 5.1 Support - Bootstrap 4 Datetime Picker Rails Add gem 'bootstrap4-datetime-picker-rails' to your Gemfile Execute bundle Add //= require tempusdominus-bootstrap-4.js to your application.js Add @import \"tempusdominus-bootstrap-4.css\" to your application.scss",
191191
"title": "Rails"
192192
},
193193
{
@@ -202,7 +202,7 @@
202202
},
203203
{
204204
"location": "/Installing/#manual",
205-
"text": "Acquire jQuery Acquire Moment.js Acquire script type= text/javascript src= /path/to/jquery.js /script script type= text/javascript src= /path/to/moment.js /script script type= text/javascript src= /path/to/tempusdominus-bootstrap-4.min.js /script",
205+
"text": "Acquire jQuery Acquire Moment.js Acquire script type= text/javascript src= /path/to/jquery.js /script script type= text/javascript src= /path/to/moment.js /script script type= text/javascript src= /path/to/tempusdominus-bootstrap-4.min.js /script",
206206
"title": "Manual"
207207
},
208208
{

0 commit comments

Comments
 (0)