Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2380,39 +2380,34 @@ export class Datetime implements ComponentInterface {
return;
}

this.setWorkingParts({
...this.workingParts,
const targetValue = {
month: _month,
day,
year: _year,
isAdjacentDay,
});
};

if (isAdjacentDay) {
// The user selected a day outside the current month. Ignore this button, as the month will be re-rendered.
this.el.blur();
this.animateToDate(this.workingParts);
}

// multiple only needs date info, so we can wipe out other fields like time
if (multiple) {
this.setActiveParts(
{
month: _month,
day,
year: _year,
isAdjacentDay,
},
isActive
);
this.activeParts = targetValue;
this.animateToDate(targetValue);
} else {
this.setActiveParts({
...activePart,
month: _month,
day,
year: _year,
isAdjacentDay,
this.setWorkingParts({
...this.workingParts,
...targetValue,
});

// multiple only needs date info, so we can wipe out other fields like time
if (multiple) {
this.setActiveParts(targetValue, isActive);
} else {
this.setActiveParts({
...activePart,
...targetValue,
});
}
}
}}
>
Expand Down
Loading