HTML5 date field and placeholder text in Safari

后端 未结 5 1269
难免孤独
难免孤独 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:47

    CSS for iOS Safari:

    input[type='date']:after {
      color: #aaa;
      content: attr(placeholder);
    }
    

    Then use placeholder on date input:

    
    

提交回复
热议问题