-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2469 from Eonasdan/development
Development
- Loading branch information
Showing
26 changed files
with
495 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,4 +222,4 @@ <h5>Community</h5> | |
|
||
|
||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,4 +538,4 @@ <h5>Community</h5> | |
|
||
|
||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1018,7 +1018,7 @@ <h3 id="linked-pickers">Linked pickers <a class="anchorjs-link" aria-label="Anch | |
const subscription = linked2.subscribe(tempusDominus.Namespace.events.change, (e) => { | ||
linked1.updateOptions({ | ||
restrictions: { | ||
maxDate: e.detail.date | ||
maxDate: e.date | ||
} | ||
}); | ||
}); | ||
|
@@ -1078,7 +1078,7 @@ <h3 id="linked-pickers">Linked pickers <a class="anchorjs-link" aria-label="Anch | |
const subscription = linked2.subscribe(tempusDominus.Namespace.events.change, (e) => { | ||
linked1.updateOptions({ | ||
restrictions: { | ||
maxDate: e.detail.date | ||
maxDate: e.date | ||
} | ||
}); | ||
}); | ||
|
@@ -1755,6 +1755,78 @@ <h3 id="setting-options">Update options <a class="anchorjs-link" aria-label="Anc | |
</script> | ||
</section> | ||
|
||
<section> | ||
<h3 id="container-option">Example with container parameter<a class="anchorjs-link" aria-label="Anchor" href="#container-option"><i class="fas fa-anchor"></i></a> <small class="show-code" title="View Code"><i class="fas fa-code"></i></small></h3> | ||
|
||
<p> | ||
All you need is an element to atach the picker to and a parent container. | ||
</p> | ||
|
||
<div class="code-blocks d-none"> | ||
<ul class="nav nav-tabs" role="tablist"> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link active" id="container-optionHtml-tab" data-bs-toggle="tab" data-bs-target="#container-optionHtml" type="button" role="tab" aria-controls="container-optionHtml" aria-selected="true">HTML | ||
</button> | ||
</li> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="container-optionJs-tab" data-bs-toggle="tab" data-bs-target="#container-optionJs" type="button" role="tab" aria-controls="container-optionJs" aria-selected="false">Javascript | ||
</button> | ||
</li> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="container-optionLog-tab" data-bs-toggle="tab" data-bs-target="#container-optionLog" type="button" role="tab" aria-controls="container-optionLog" aria-selected="false">Events | ||
</button> | ||
</li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class="tab-pane fade show active" id="container-optionHtml" role="tabpanel" aria-labelledby="container-optionHtml-tab"> | ||
<pre> <code class="language-html"> | ||
<div id='parent-container' class='relative p-5' style='overflow: auto; height: 100px; width: 100%;'> | ||
<div class='input-group log-event' id='containerDatePicker' data-td-target-input='nearest' | ||
data-td-target-toggle='nearest'> | ||
<input id='containerDatePickerInput' type='text' class='form-control' /> | ||
<span class='input-group-text' data-td-target='#settingOptions' data-td-toggle='datetimepicker'> | ||
<span class='fas fa-calendar'></span> | ||
</div> | ||
</div> | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="tab-pane fade" id="container-optionJs" role="tabpanel" aria-labelledby="container-optionJs-tab"> | ||
<pre> <code class="language-javascript"> | ||
new tempusDominus.TempusDominus(document.getElementById('containerDatePicker'), { | ||
container: document.querySelector('div#parent-container'), | ||
}); | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="tab-pane fade logger" id="container-optionLog" role="tabpanel" aria-labelledby="datetimepicker1Log-tab"> | ||
<div class="alert alert-info"> | ||
Events will display as you manipulate the picker. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-sm-6"> | ||
<div id="parent-container" class="relative p-5" style="overflow: auto; height: 100px; width: 100%;"> | ||
<div class="input-group log-event" id="containerDatePicker" data-td-target-input="nearest" data-td-target-toggle="nearest"> | ||
<input id="containerDatePickerInput" type="text" class="form-control"> | ||
<span class="input-group-text" data-td-target="#settingOptions" data-td-toggle="datetimepicker"> | ||
<span class="fas fa-calendar"></span> | ||
</span></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
new tempusDominus.TempusDominus(document.getElementById('containerDatePicker'), { | ||
container: document.querySelector('div#parent-container'), | ||
}); | ||
</script> | ||
</section> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
</div> | ||
</main></div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1751,6 +1751,78 @@ <h3 id="setting-options">Updating Options <a class="anchorjs-link" aria-label="A | |
</script> | ||
</section> | ||
|
||
<section> | ||
<h3 id="container-option">Example with container parameter<a class="anchorjs-link" aria-label="Anchor" href="#container-option"><i class="fas fa-anchor"></i></a> <small class="show-code" title="View Code"><i class="fas fa-code"></i></small></h3> | ||
|
||
<p> | ||
All you need is an element to atach the picker to and a parent container. | ||
</p> | ||
|
||
<div class="code-blocks d-none"> | ||
<ul class="nav nav-tabs" role="tablist"> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link active" id="container-optionHtml-tab" data-bs-toggle="tab" data-bs-target="#container-optionHtml" type="button" role="tab" aria-controls="container-optionHtml" aria-selected="true">HTML | ||
</button> | ||
</li> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="container-optionJs-tab" data-bs-toggle="tab" data-bs-target="#container-optionJs" type="button" role="tab" aria-controls="container-optionJs" aria-selected="false">Javascript | ||
</button> | ||
</li> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="container-optionLog-tab" data-bs-toggle="tab" data-bs-target="#container-optionLog" type="button" role="tab" aria-controls="container-optionLog" aria-selected="false">Events | ||
</button> | ||
</li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class="tab-pane fade show active" id="container-optionHtml" role="tabpanel" aria-labelledby="container-optionHtml-tab"> | ||
<pre> <code class="language-html"> | ||
<div id='parent-container' class='relative p-5' style='overflow: auto; height: 100px; width: 100%;'> | ||
<div class='input-group log-event' id='containerDatePicker' data-td-target-input='nearest' | ||
data-td-target-toggle='nearest'> | ||
<input id='containerDatePickerInput' type='text' class='form-control' /> | ||
<span class='input-group-text' data-td-target='#settingOptions' data-td-toggle='datetimepicker'> | ||
<span class='fas fa-calendar'></span> | ||
</div> | ||
</div> | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="tab-pane fade" id="container-optionJs" role="tabpanel" aria-labelledby="container-optionJs-tab"> | ||
<pre> <code class="language-javascript"> | ||
$('#containerDatePicker').tempusDominus({ | ||
container: $('div[id="parent-container"]')[0], | ||
}); | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="tab-pane fade logger" id="container-optionLog" role="tabpanel" aria-labelledby="datetimepicker1Log-tab"> | ||
<div class="alert alert-info"> | ||
Events will display as you manipulate the picker. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-sm-6"> | ||
<div id="parent-container" class="relative p-5" style="overflow: auto; height: 100px; width: 100%;"> | ||
<div class="input-group log-event" id="containerDatePicker" data-td-target-input="nearest" data-td-target-toggle="nearest"> | ||
<input id="containerDatePickerInput" type="text" class="form-control"> | ||
<span class="input-group-text" data-td-target="#settingOptions" data-td-toggle="datetimepicker"> | ||
<span class="fas fa-calendar"></span> | ||
</span></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
$('#containerDatePicker').tempusDominus({ | ||
container: $('div[id="parent-container"]')[0], | ||
}); | ||
</script> | ||
</section> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
</div> | ||
</main></div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -507,4 +507,4 @@ <h5>Community</h5> | |
|
||
|
||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,4 +283,4 @@ <h5>Community</h5> | |
|
||
|
||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.