Changes between Version 14 and Version 15 of Styling Form Controls
- Timestamp:
- Jul 17, 2012, 12:18:49 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Styling Form Controls
v14 v15 83 83 input:-webkit-autofill { background: papayaWhip; color: hotPink; } 84 84 }}} 85 86 === Date input type === 87 88 You can disable the native calendar picker by the following code: 89 90 {{{ 91 <style> 92 ::-webkit-calendar-picker-indicator { 93 display: none; 94 } 95 </style> 96 <script> 97 dateInput.addEventListener('keydown', function(event) { 98 if (event.keyIdentifier == "Down") { 99 event.preventDefault() 100 } 101 }, false); 102 </script> 103 }}} 104 105 Note: This doesn't work for iOS, Android, and Blackberry. 106 107 There are no ways to specify the date format in the text box. It always reflect OS setting. 108 Also, there are no ways to specify style of the native calendar picker. 85 109 86 110 == Form validation message == … … 162 186 163 187 ::-webkit-validation-bubble-message:before { 164 content: "";165 display: inline-block;166 width: 16px;167 height: 16px;168 margin-right: 4px;169 background: url(http://trac.webkit.org/export/90202/trunk/Source/WebCore/inspector/front-end/Images/errorMediumIcon.png)188 content: ""; 189 display: inline-block; 190 width: 16px; 191 height: 16px; 192 margin-right: 4px; 193 background: url(http://trac.webkit.org/export/90202/trunk/Source/WebCore/inspector/front-end/Images/errorMediumIcon.png) 170 194 } 171 195