Skip to content

Commit d85f8f5

Browse files
authored
feat(datetime): add preferWheel support for date presentation (#25422)
1 parent b8f506b commit d85f8f5

32 files changed

+367
-60
lines changed

.github/workflows/actions/build-angular/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json')}}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json')}}-v4
1717
- name: Cache Angular Node Modules
1818
uses: actions/cache@v2
1919
env:
2020
cache-name: angular-node-modules
2121
with:
2222
path: ./angular/node_modules
23-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./angular/package-lock.json')}}-v2
23+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./angular/package-lock.json')}}-v4
2424
- uses: ./.github/workflows/actions/download-archive
2525
with:
2626
name: ionic-core

.github/workflows/actions/build-core/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
cache-name: core-node-modules
1818
with:
1919
path: ./core/node_modules
20-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
20+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
2121
- name: Install Dependencies
2222
run: npm install
2323
working-directory: ./core

.github/workflows/actions/build-react-router/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- name: Install Dependencies
1818
run: npm install --legacy-peer-deps
1919
shell: bash

.github/workflows/actions/build-react/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/build-vue-router/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/build-vue/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-angular-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-core-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-core-lint/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- name: Lint
1818
run: npm run lint
1919
shell: bash

.github/workflows/actions/test-core-screenshot/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
cache-name: core-node-modules
2121
with:
2222
path: ./core/node_modules
23-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
23+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
2424
- uses: ./.github/workflows/actions/download-archive
2525
with:
2626
name: ionic-core

.github/workflows/actions/test-core-spec/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-react-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-react-router-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

.github/workflows/actions/test-vue-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
cache-name: core-node-modules
1414
with:
1515
path: ./core/node_modules
16-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
16+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v4
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-core

core/src/components/datetime/datetime.scss

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
overflow: hidden;
2020
}
2121

22+
/**
23+
* When using the wheel picker to switch
24+
* between months, sometimes the allowed
25+
* dates may be filtered. As a result, it
26+
* is possible to get a layout shift as
27+
* the picker column will shrink to fit the
28+
* widest item in the column. Setting a minimum
29+
* width avoids this layout shifting.
30+
*/
31+
ion-picker-column-internal {
32+
min-width: 26px;
33+
}
34+
2235
:host(.datetime-size-fixed) {
2336
width: auto;
2437
max-width: 350px;
@@ -58,21 +71,19 @@
5871
* the order we need to manually switch
5972
* the text alignment too.
6073
*/
61-
:host .datetime-year .order-month-first .month-column {
62-
order: 1;
63-
}
74+
:host .wheel-order-year-first .day-column {
75+
order: 3;
6476

65-
:host .datetime-year .order-month-first .year-column {
66-
order: 2;
77+
text-align: end;
6778
}
6879

69-
:host .datetime-year .order-year-first .month-column {
80+
:host .wheel-order-year-first .month-column {
7081
order: 2;
7182

7283
text-align: end;
7384
}
7485

75-
:host .datetime-year .order-year-first .year-column {
86+
:host .wheel-order-year-first .year-column {
7687
order: 1;
7788

7889
text-align: start;

0 commit comments

Comments
 (0)