Skip to content

Commit

Permalink
6.7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Jul 6, 2023
1 parent 93de311 commit c2aa82d
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 20 deletions.
5 changes: 4 additions & 1 deletion build/change-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const DRY_RUN =

// These are the filetypes we only care about replacing the version
const GLOB = [
'**/*.{css,html,js,json,md,scss,txt,yml,ts,nuspec,properties}',
'**/*.{css,js,json,md,scss,txt,yml,ts,nuspec,properties}',
'**/shell.html',
'**/installing.html',
'**/templates/index.html',
'!**/change-log*',
];
const GLOBBY_OPTIONS = {
Expand Down
22 changes: 17 additions & 5 deletions dist/js/tempus-dominus.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.esm.min.js

Large diffs are not rendered by default.

22 changes: 17 additions & 5 deletions dist/js/tempus-dominus.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tempus-dominus.min.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/docs/partials/change-log.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<div id='change-log'>
<h1>Version 6</h1>


<div class='row'>
<h2>6.7.11</h2>
<h3>Bug fixes</h3>
<ul>
<li>Hotfix for #2837</li>
</ul>
</div>

<div class='row'>
<h2>6.7.10</h2>
<h3>New</h3>
Expand Down
24 changes: 19 additions & 5 deletions src/js/tempus-dominus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ class TempusDominus {
if (this.optionsStore.options.allowInputToggle) {
this.optionsStore.input?.removeEventListener(
'click',
this._toggleClickEvent
this._openClickEvent
);
this.optionsStore.input?.removeEventListener(
'focus',
this._toggleClickEvent
this._openClickEvent
);
}
this._toggle?.removeEventListener('click', this._toggleClickEvent);
Expand Down Expand Up @@ -443,8 +443,8 @@ class TempusDominus {

this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
if (this.optionsStore.options.allowInputToggle) {
this.optionsStore.input.addEventListener('click', this._toggleClickEvent);
this.optionsStore.input.addEventListener('focus', this._toggleClickEvent);
this.optionsStore.input.addEventListener('click', this._openClickEvent);
this.optionsStore.input.addEventListener('focus', this._openClickEvent);
}

if (this.optionsStore.input.value) {
Expand Down Expand Up @@ -506,7 +506,7 @@ class TempusDominus {
this._eventEmitters.action.emit({
e: {
currentTarget: this.display.widget.querySelector(
`.${Namespace.css.switch}`
'[data-action="togglePicker"]'
),
},
action: ActionTypes.togglePicker,
Expand Down Expand Up @@ -564,6 +564,20 @@ class TempusDominus {
return;
this.toggle();
};

/**
* Event for when the toggle is clicked. This is a class level method so there's
* something for the remove listener function.
* @private
*/
private _openClickEvent = () => {
if (
(this.optionsStore.element as HTMLInputElement)?.disabled ||
this.optionsStore.input?.disabled
)
return;
if (!this.display.isVisible) this.show();
};
}

/**
Expand Down
6 changes: 6 additions & 0 deletions types/tempus-dominus.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ declare class TempusDominus {
* @private
*/
private _toggleClickEvent;
/**
* Event for when the toggle is clicked. This is a class level method so there's
* something for the remove listener function.
* @private
*/
private _openClickEvent;
}
/**
* Called from a locale plugin.
Expand Down

0 comments on commit c2aa82d

Please sign in to comment.