LostCode
LostCode

Reputation: 533

Hide input[type="month"] clear button in mobile chrome/safari

I made web application for mobile. I need to remove clear button when open input[type="month"] popup. I tried many way that i found in stackoverflow, but failed. I tried input[type="month"]::-webkit-clear-button but didn't work. I also tried add required="required" attribute, but didn't work.

input[type="month"]::-webkit-clear-button {
 -webkit-appearance: none;
  display: none;
}
<input type="month" id="month" required="required">

Is there any other solution? or did I make a mistake?

Upvotes: 0

Views: 1117

Answers (1)

Jack
Jack

Reputation: 9388

If you're referring to the "Clear" next to "Done" (as seen below), then unfortunately it is not possible. The keyboard(s) for Mobile Safari are fixed and the only control you have are the "variants" that you can show based on [type] attributes.

enter image description here

Upvotes: 1

Related Questions