input type=date has no size when empty

Originator:maxi.richt
Number:rdar://27031373 Date Originated:27 Jun 2016
Status:Open Resolved:
Product:Safari Product Version:
Classification: Reproducible:
 
Summary:
An input type=date with -webkit-appearance: none; (for custom styling) has no default size when it's empty.

Steps to Reproduce:
0. Create a new, empty html file
1. Add an <input type="text"> with no value to the document
2. Add an <input type="date"> with no value to the document
3. Set -webkit-appearance: none; on both elements.

(See test-inputdate.html)

Expected Results:
The empty <input type="date"> should be sized like the empty <input type="text">.

Actual Results:
The empty <input type="date"> element is way too small. It has no own width/height, it's only visible by its padding/border.

Version:
iOS 9.3.2 (13F69) on iPad MD510FD/A

Notes:


Configuration:


Attachments:

test-inputdate.html:
<!DOCTYPE html>
<html>
<head>
  <title>test: input size when empty</title>
  <style>
    input {
      -webkit-appearance: none;
    }
  </style>
</head>
<body>
  <input type="text" name="text-filled" value="2016-10-10"/>
  <input type="text" name="text-empty" value=""/>
  <hr/>
  <input class="date" type="date" name="date-filled" value="2016-10-10"/>
  <input class="date" type="date" name="date-empty" value=""/>
</body>
</html>

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!