Repository: ionic-team/ionic-framework
File: core/src/components/datetime/datetime.tsx (TypeScript)

Code before:
                      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.activeParts = targetValue;
                      this.animateToDate(targetValue);
                    } else {
                      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,
                        });
                      }
                    }
                  }}
                >
                  {text}
                </button>
              </div>
            );
          })}
        </div>
      </div>
    );
  }
  private renderCalendarBody() {
    return (
      <div class="calendar-body ion-focusable" ref={(el) => (this.calendarBodyRef = el)} tabindex="0">
        {generateMonths(this.workingParts, this.forceRenderDate).map(({ month, year }) => {
          return this.renderMonth(month, year);
        })}
      </div>
    );
  }
  private renderCalendar(mode: Mode) {
    return (
      <div class="datetime-calendar" key="datetime-calendar">
        {this.renderCalendarHeader(mode)}

Review comment (suggestion):
The `ionChange` is no longer firing when clicking on an adjacent day due to this change.

Code after:
                      this.el.blur();
                      this.activeParts = { ...activePart, ...referenceParts };
                      this.animateToDate(referenceParts);
                      this.confirm();
                    } else {
                      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,
                        });
                      }
                    }
                  }}
                >
                  {text}
                </button>
              </div>
            );
          })}
        </div>
      </div>
    );
  }
  private renderCalendarBody() {
    return (
      <div class="calendar-body ion-focusable" ref={(el) => (this.calendarBodyRef = el)} tabindex="0">
        {generateMonths(this.workingParts, this.forceRenderDate).map(({ month, year }) => {
          return this.renderMonth(month, year);
        })}
      </div>
    );
  }
  private renderCalendar(mode: Mode) {
    return (
      <div class="datetime-calendar" key="datetime-calendar">
        {this.renderCalendarHeader(mode)}
        {this.renderCalendarBody()}
      </div>
    );
  }
  private renderTimeLabel() {
    const hasSlottedTimeLabel = this.el.querySelector('[slot="time-label"]') !== null;
    if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {