HTML5 date field and placeholder text in Safari

后端 未结 5 1270
难免孤独
难免孤独 2021-01-11 20:19

I\'ve got an issue, but I\'m not sure if it\'s something I\'m doing wrong, or if this feature just isn\'t supported yet.

Basically I have the following lines of code

5条回答
  •  独厮守ぢ
    2021-01-11 20:56

    The iPad is doing the correct thing. The placeholder attribute isn't supported on input elements on type date. It's probably working on desktop Safari because that doesn't support the date type, so that attribute is being ignored and you're left with a plain text field. You could check in the DOM inspector.

提交回复
热议问题