Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
3 changes: 2 additions & 1 deletion core/src/components/datetime/datetime.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@
* is selected should have ion-color for
* text color and be bolder.
*/
:host .calendar-day.calendar-day-active {
:host .calendar-day.calendar-day-active,
:host .calendar-day.calendar-day-adjacent-day.calendar-day-active {
color: current-color(base);

font-weight: 600;
Expand Down
3 changes: 2 additions & 1 deletion core/src/components/datetime/datetime.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
* is selected should have ion-color for
* text color and be bolder.
*/
:host .calendar-day.calendar-day-active {
:host .calendar-day.calendar-day-active,
:host .calendar-day.calendar-day-adjacent-day.calendar-day-active {
color: current-color(contrast);
}

Expand Down
43 changes: 16 additions & 27 deletions core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2383,35 +2383,24 @@ export class Datetime implements ComponentInterface {
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.setWorkingParts({
...this.workingParts,
month: _month,
day,
year: _year,
isAdjacentDay,
});

// 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 = referenceParts;
this.animateToDate(referenceParts);
this.confirm();
} else {
this.setActiveParts({
...activePart,
month: _month,
day,
year: _year,
isAdjacentDay,
this.setWorkingParts({
...this.workingParts,
...referenceParts,
});

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