how to align placeholder of ionic date time o be centered
text-center
doesn’t work?
it doesn’t work
also i need icons to be inside the input
ok, from my side can’t do more without code
1 Like
<ion-item class="label">
<ion-input type="text" value="" text-center placeholder="الإسم"></ion-input>
<ion-icon name="ios-person-outline" item-left></ion-icon>
</ion-item>
<ion-item class="label">
<ion-input type="text" value="" text-center placeholder="الإيميل"></ion-input>
<ion-icon name="ios-mail-outline" item-left></ion-icon>
</ion-item>
<ion-item class="label">
<ion-input type="password" text-center placeholder="كلمة المرور"></ion-input>
<ion-icon name="ios-lock-outline" item-left></ion-icon>
</ion-item>
<ion-item class="label">
<ion-datetime displayFormat="MM/DD/YYYY" pickerFormat="MM DD YYYY" text-center placeholder="تاريخ الميلاد"
doneText="تم" cancelText="تراجع"></ion-datetime>
<ion-icon name="ios-calendar-outline" item-left></ion-icon>
</ion-item>
Ok so I don’t think you can out of the box, maybe I’m wrong, if so be my guest and correct me, would like to learn what I missed.
If I’m not wrong, your options, spontaneously I would say
-
Don’t use
ion-item
as the shadoweddiv.item-native
has a valuejustify-content: space-between
-
Provide a PR to add a css4 variables (but not sure it will be accepted, I mean it’s not an iOS/Android behavior to have item centered)
-
Dirty inject css with javascript in your shadow dom