Repository navigation
feat(datetime): add part for month/year button - #27618
Conversation
|
|
| :host .calendar-action-buttons ion-item, | ||
| :host .calendar-action-buttons ion-button { | ||
| color: #{$text-color-step-350}; | ||
| --color: #{$text-color-step-350}; |
There was a problem hiding this comment.
Since we are exposing the ion-item instance we should use the public API for setting the color otherwise developers will run into issues changing the color using --color.
There was a problem hiding this comment.
Turns out this also fixes a bug where the expanded state of the month/year toggle never changed color! This is why there are screenshot diffs here.
Switch to MD mode and click the month/year button. Observe that the color of the button only changes to blue when you hover over it. Repeat the same steps on iOS mode. Observe that the color of the button correctly changes to blue regardless of hover state when expanded.
There was a problem hiding this comment.
We added this behavior in
ionic-framework/core/src/components/datetime/datetime.scss
Lines 424 to 426 in 9d459bd
color directly in the MD stylesheets this color never applied.
averyrousseau
left a comment
There was a problem hiding this comment.
LGTM aside from a small description change 👍
| * @part month-year-button - The button that opens the month/year picker when | ||
| * using a grid style layout with `presentation="date-time"` or `"time-date"`. |
There was a problem hiding this comment.
The button also appears with presentation="date". It'd probably be better to just say when using a grid style layout, since that covers all relevant presentations.
Issue number: resolves #26596
What is the current behavior?
There is no way to customize the month/year toggle button using CSS.
What is the new behavior?
Does this introduce a breaking change?
Other information