Skip to content

Commit

Permalink
5.0.0-alpha.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Jan 23, 2018
1 parent 374945f commit 07080bf
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 62 deletions.
4 changes: 2 additions & 2 deletions build/css/tempusdominus-bootstrap-4.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*@preserve
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2017 Jonathan Peterson
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2018 Jonathan Peterson
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
*/

Expand Down
4 changes: 2 additions & 2 deletions build/css/tempusdominus-bootstrap-4.min.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*@preserve
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2017 Jonathan Peterson
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2018 Jonathan Peterson
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
*/

Expand Down
36 changes: 29 additions & 7 deletions build/js/tempusdominus-bootstrap-4.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*@preserve
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2017 Jonathan Peterson
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2018 Jonathan Peterson
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
*/

Expand Down Expand Up @@ -1632,10 +1632,9 @@ var TempusDominusBootstrap4 = function ($) {

TempusDominusBootstrap4.prototype._init = function _init() {
if (this._element.hasClass('input-group')) {
// in case there is more then one 'input-group-addon' Issue #48
var datepickerButton = this._element.find('.datepickerbutton');
if (datepickerButton.length === 0) {
this.component = this._element.find('.input-group-append');
this.component = this._element.find('[data-toggle="datetimepicker"]');
} else {
this.component = datepickerButton;
}
Expand Down Expand Up @@ -1749,24 +1748,32 @@ var TempusDominusBootstrap4 = function ($) {
var row = [];
if (this._options.buttons.showToday) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'today',
'title': this._options.tooltips.today
}).append($('<span>').addClass(this._options.icons.today))));
}
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'togglePicker',
'title': this._options.tooltips.selectTime
}).append($('<span>').addClass(this._options.icons.time))));
}
if (this._options.buttons.showClear) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'clear',
'title': this._options.tooltips.clear
}).append($('<span>').addClass(this._options.icons.clear))));
}
if (this._options.buttons.showClose) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'close',
'title': this._options.tooltips.close
}).append($('<span>').addClass(this._options.icons.close))));
Expand Down Expand Up @@ -2405,20 +2412,35 @@ var TempusDominusBootstrap4 = function ($) {
}
}
this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
}
case 'selectMinute':
this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'selectSecond':
this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'clear':
this.clear();
break;
case 'close':
this.hide();
break;
case 'today':
{
var todaysDate = this.getMoment();
Expand Down
8 changes: 4 additions & 4 deletions build/js/tempusdominus-bootstrap-4.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tempusdominus/bootstrap-4",
"type": "component",
"version": "5.0.0-alpha14",
"version": "5.0.0-alpha15",
"description": "Date/time picker widget based on twitter bootstrap",
"keywords": [
"bootstrap",
Expand Down
10 changes: 8 additions & 2 deletions docs/Installing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ <h3 id="tempusdominusbootstrap4"><a href="https://www.nuget.org/packages/Tempus.
</code></pre>

<h3 id="rails">Rails</h3>
<p>Need new wrapper for this version.</p>
<p>Rails 5.1 Support - <a href="https://github.com/Bialogs/bootstrap4-datetime-picker-rails">Bootstrap 4 Datetime Picker Rails</a></p>
<ol>
<li>Add <code>gem 'bootstrap4-datetime-picker-rails'</code> to your <code>Gemfile</code></li>
<li>Execute <code>bundle</code></li>
<li>Add <code>//= require tempusdominus-bootstrap-4.js</code> to your <code>application.js</code></li>
<li>Add <code>@import "tempusdominus-bootstrap-4.css"</code> to your <code>application.scss</code></li>
</ol>
<h3 id="angular-wrapper">Angular Wrapper</h3>
<p>Need new wrapper for this version.</p>
<h3 id="meteorjs">Meteor.js</h3>
Expand All @@ -185,7 +191,7 @@ <h2 id="manual">Manual</h2>
<ol>
<li>Acquire <a href="http://jquery.com">jQuery</a></li>
<li>Acquire <a href="https://github.com/moment/moment">Moment.js</a></li>
<li>Acquire </li>
<li>Acquire</li>
</ol>
<pre><code class="html">&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/moment.js&quot;&gt;&lt;/script&gt;
Expand Down
4 changes: 2 additions & 2 deletions docs/css/tempusdominus-bootstrap-4.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*@preserve
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2017 Jonathan Peterson
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2018 Jonathan Peterson
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h1 class="mb-3">Tempus Dominus</h1>
<a href="Installing/" class="btn btn-lg btn-outline-secondary">Download</a>
</div>
<p class="text-muted mb-0">
Currently v5.0.0-alpha.14
Currently v5.0.0-alpha.15
</p>
</div>
</div>
Expand Down
36 changes: 29 additions & 7 deletions docs/js/tempusdominus-bootstrap-4.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*@preserve
* Tempus Dominus Bootstrap4 v5.0.0-alpha14 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2017 Jonathan Peterson
* Tempus Dominus Bootstrap4 v5.0.0-alpha15 (https://tempusdominus.github.io/bootstrap-4/)
* Copyright 2016-2018 Jonathan Peterson
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
*/

Expand Down Expand Up @@ -1632,10 +1632,9 @@ var TempusDominusBootstrap4 = function ($) {

TempusDominusBootstrap4.prototype._init = function _init() {
if (this._element.hasClass('input-group')) {
// in case there is more then one 'input-group-addon' Issue #48
var datepickerButton = this._element.find('.datepickerbutton');
if (datepickerButton.length === 0) {
this.component = this._element.find('.input-group-append');
this.component = this._element.find('[data-toggle="datetimepicker"]');
} else {
this.component = datepickerButton;
}
Expand Down Expand Up @@ -1749,24 +1748,32 @@ var TempusDominusBootstrap4 = function ($) {
var row = [];
if (this._options.buttons.showToday) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'today',
'title': this._options.tooltips.today
}).append($('<span>').addClass(this._options.icons.today))));
}
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'togglePicker',
'title': this._options.tooltips.selectTime
}).append($('<span>').addClass(this._options.icons.time))));
}
if (this._options.buttons.showClear) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'clear',
'title': this._options.tooltips.clear
}).append($('<span>').addClass(this._options.icons.clear))));
}
if (this._options.buttons.showClose) {
row.push($('<td>').append($('<a>').attr({
href: '#',
tabindex: '-1',
'data-action': 'close',
'title': this._options.tooltips.close
}).append($('<span>').addClass(this._options.icons.close))));
Expand Down Expand Up @@ -2405,20 +2412,35 @@ var TempusDominusBootstrap4 = function ($) {
}
}
this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
}
case 'selectMinute':
this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'selectSecond':
this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
this._doAction(e, 'showPicker');
if (!this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'clear':
this.clear();
break;
case 'close':
this.hide();
break;
case 'today':
{
var todaysDate = this.getMoment();
Expand Down
8 changes: 4 additions & 4 deletions docs/mkdocs/search_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"docs": [
{
"location": "/",
"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",
"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",
"title": "Tempus Dominus Bootstrap 4"
},
{
Expand Down Expand Up @@ -152,7 +152,7 @@
},
{
"location": "/Installing/",
"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.",
"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.",
"title": "Installing"
},
{
Expand Down Expand Up @@ -187,7 +187,7 @@
},
{
"location": "/Installing/#rails",
"text": "Need new wrapper for this version.",
"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",
"title": "Rails"
},
{
Expand All @@ -202,7 +202,7 @@
},
{
"location": "/Installing/#manual",
"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",
"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",
"title": "Manual"
},
{
Expand Down
Loading

0 comments on commit 07080bf

Please sign in to comment.