You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(datetime): add showAdjacentDays to display days from the previous and next months (#30262)
Issue number: Internal ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> Adds a new property to datetime, showAdjacentDays, that when true will show the last days of the previous month and the first days of the next month. This will just occupy empty "cells" at the beginning of the month "table" and add rows to the table until a maximum of 6 rows are displayed. ## Changes - add styles for adjacent day button - add `showAdjacentDays` property to datetime component - change month generation to respect new property - add visual tests to new feature ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information [Preview](https://ionic-framework-git-rou-11118v2-ionic1.vercel.app/src/components/datetime/test/show-adjacent-days) --------- Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com> Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
* Resets the internal state of the datetime but does not update the value. Passing a valid ISO-8601 string will reset the state of the component to the provided date. If no value is provided, the internal state will be reset to the clamped value of the min, max and today.
945
945
*/
946
946
"reset": (startDate?: string)=>Promise<void>;
947
+
/**
948
+
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
949
+
*/
950
+
"showAdjacentDays": boolean;
947
951
/**
948
952
* If `true`, a "Clear" button will be rendered alongside the default "Cancel" and "OK" buttons at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
* If `true`, the datetime appears normal but the selected date cannot be changed.
5780
5784
*/
5781
5785
"readonly"?: boolean;
5786
+
/**
5787
+
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
5788
+
*/
5789
+
"showAdjacentDays"?: boolean;
5782
5790
/**
5783
5791
* If `true`, a "Clear" button will be rendered alongside the default "Cancel" and "OK" buttons at the bottom of the `ion-datetime` component. Developers can also use the `button` slot if they want to customize these buttons. If custom buttons are set in the `button` slot then the default buttons will not be rendered.
0 commit comments