0

I am using the following css class on my lightning-input type date field on my aura component

css:

    .THIS.test{
-webkit-appearance : none !important;
text-align :left !important;} 

cmp:

<lightning:input class="test" type="date"</lightning:input>

It is working fine on every place except IOS 15 and onward, where the date text is centre aligned instead of left.

I tried the following after checking on google for some answers :

.THIS.test{
-webkit-appearance : none !important;
text-align :left !important;} 

But this did not work.I also tried using the below statement into the css file, but it seems its not supported on aura.

input::-webkit-date-and-time-value{ text-align:left; }

Can anyone suggest what I can use in this case?enter image description here

1
  • I have tried the way you suggested but getting the same error again .Please suggest some ways to sort it out . Jul 26, 2022 at 6:16

1 Answer 1

0

I think you've to give space between the .THIS and your custom class. Try the below:

.THIS .test{
text-align :left !important;
} 
1
  • I have tried the same way you suggested but getting the same error again .Please suggest some ways to sort it out . Jul 26, 2022 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .