mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
fix(picker): do not change datetime/picker column order in RTL (#17018)
Closes #16294
This commit is contained in:
@ -239,6 +239,7 @@ rules:
|
|||||||
- contain
|
- contain
|
||||||
- content
|
- content
|
||||||
- cursor
|
- cursor
|
||||||
|
- direction
|
||||||
- empty-cells
|
- empty-cells
|
||||||
- object-fit
|
- object-fit
|
||||||
- opacity
|
- opacity
|
||||||
@ -254,7 +255,6 @@ rules:
|
|||||||
|
|
||||||
property-blacklist:
|
property-blacklist:
|
||||||
- background-position
|
- background-position
|
||||||
- direction
|
|
||||||
- right
|
- right
|
||||||
- left
|
- left
|
||||||
- float
|
- float
|
||||||
|
@ -18,3 +18,19 @@ test('datetime: basic', async () => {
|
|||||||
compare = await page.compareScreenshot('should open custom picker');
|
compare = await page.compareScreenshot('should open custom picker');
|
||||||
expect(compare).toMatchScreenshot();
|
expect(compare).toMatchScreenshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('datetime: basic-rtl', async () => {
|
||||||
|
const page = await newE2EPage({
|
||||||
|
url: '/src/components/datetime/test/basic?ionic:_testing=true&rtl=true'
|
||||||
|
});
|
||||||
|
|
||||||
|
const datetime = await page.find('#customPickerOptions');
|
||||||
|
await datetime.click();
|
||||||
|
|
||||||
|
const picker = await page.find('ion-picker');
|
||||||
|
await picker.waitForVisible();
|
||||||
|
await page.waitFor(250);
|
||||||
|
|
||||||
|
const compare = await page.compareScreenshot('should open custom picker');
|
||||||
|
expect(compare).toMatchScreenshot();
|
||||||
|
});
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>h:mm a</ion-label>
|
<ion-label>h:mm a</ion-label>
|
||||||
<ion-datetime display-format="h:mm a"></ion-datetime>
|
<ion-datetime display-format="h:mm a" value="01:47"></ion-datetime>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-item>
|
<ion-item>
|
||||||
|
@ -108,11 +108,6 @@
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
.picker-columns {
|
.picker-columns {
|
||||||
@include rtl() {
|
|
||||||
// Date is the same format in both directions
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
}
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@ -121,6 +116,7 @@
|
|||||||
margin-bottom: var(--ion-safe-area-bottom, 0);
|
margin-bottom: var(--ion-safe-area-bottom, 0);
|
||||||
|
|
||||||
contain: strict;
|
contain: strict;
|
||||||
|
direction: ltr;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user