From d9b4f9e2c27623fd5a7d6af76ad1851a41af19b1 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Wed, 4 Feb 2026 10:23:07 -0800 Subject: [PATCH 1/2] feat(datetime): add header parts to grid style --- core/api.txt | 5 + core/src/components/datetime/datetime.tsx | 23 ++- .../datetime/test/custom/datetime.e2e.ts | 174 ++++++++++++++++++ .../datetime/test/custom/index.html | 31 ++++ 4 files changed, 229 insertions(+), 4 deletions(-) diff --git a/core/api.txt b/core/api.txt index b4036e6b8e8..caa52d96978 100644 --- a/core/api.txt +++ b/core/api.txt @@ -566,7 +566,12 @@ ion-datetime,part,calendar-day ion-datetime,part,calendar-day active ion-datetime,part,calendar-day disabled ion-datetime,part,calendar-day today +ion-datetime,part,days-of-week +ion-datetime,part,header ion-datetime,part,month-year-button +ion-datetime,part,next-button +ion-datetime,part,prev-button +ion-datetime,part,prev-next-buttons ion-datetime,part,time-button ion-datetime,part,time-button active ion-datetime,part,wheel diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 95f97d37cf0..1ad9bf10557 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -88,8 +88,13 @@ import { checkForPresentationFormatMismatch, warnIfTimeZoneProvided } from './ut * layout with `presentation="date-time"` or `"time-date"`. * @part time-button active - The time picker button when the picker is open. * + * @part header - The header container for the calendar when using a grid style layout. * @part month-year-button - The button that opens the month/year picker when * using a grid style layout. + * @part prev-next-buttons - The buttons used to navigate to the next or previous month when using a grid style layout. + * @part prev-button - The button used to navigate to the previous month when using a grid style layout. + * @part next-button - The button used to navigate to the next month when using a grid style layout. + * @part days-of-week - The container for the day-of-the-week header (both weekdays and weekends) when using a grid style layout. * * @part calendar-day - The individual buttons that display a day inside of the datetime * calendar. @@ -2166,7 +2171,7 @@ export class Datetime implements ComponentInterface { const hostDir = this.el.getAttribute('dir') || undefined; return ( -
+
-