Skip to content

Commit

Permalink
Merge pull request #5832 from iamine/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Mar 3, 2023
1 parent fbcd828 commit 4204673
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
9 changes: 5 additions & 4 deletions dist/module.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12953,10 +12953,10 @@ var date_time_picker_default = (Alpine) => {
})) {
return true;
}
if (this.getMaxDate() && date.isAfter(this.getMaxDate())) {
if (this.getMaxDate() && date.isAfter(this.getMaxDate(), "day")) {
return true;
}
if (this.getMinDate() && date.isBefore(this.getMinDate())) {
if (this.getMinDate() && date.isBefore(this.getMinDate(), "day")) {
return true;
}
return false;
Expand Down Expand Up @@ -24922,7 +24922,7 @@ function applyStyle(button, stylesToApply) {
}

// node_modules/dompurify/dist/purify.es.js
/*! @license DOMPurify 2.4.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.4/LICENSE */
/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
Expand Down Expand Up @@ -25163,7 +25163,7 @@ function createDOMPurify() {
var DOMPurify = function DOMPurify2(root2) {
return createDOMPurify(root2);
};
DOMPurify.version = "2.4.4";
DOMPurify.version = "2.4.5";
DOMPurify.removed = [];
if (!window2 || !window2.document || window2.document.nodeType !== 9) {
DOMPurify.isSupported = false;
Expand Down Expand Up @@ -25296,6 +25296,7 @@ function createDOMPurify() {
IN_PLACE = cfg.IN_PLACE || false;
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
}
Expand Down
10 changes: 8 additions & 2 deletions resources/js/components/date-time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,16 @@ export default (Alpine) => {
return true
}

if (this.getMaxDate() && date.isAfter(this.getMaxDate())) {
if (
this.getMaxDate() &&
date.isAfter(this.getMaxDate(), 'day')
) {
return true
}
if (this.getMinDate() && date.isBefore(this.getMinDate())) {
if (
this.getMinDate() &&
date.isBefore(this.getMinDate(), 'day')
) {
return true
}

Expand Down
6 changes: 5 additions & 1 deletion src/Components/Concerns/Cloneable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ trait Cloneable
{
public function cloneChildComponents(): static
{
$components = $this->getChildComponentContainer()->getClone()->getComponents();
$components = [];

foreach ($this->getChildComponents() as $component) {
$components[] = $component->getClone();
}

return $this->childComponents($components);
}
Expand Down

0 comments on commit 4204673

Please sign in to comment.