- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Not showing a placeholder for input type=“date” field with HTML5. How to solve it?
To show it, use the following −
<input placeholder = "Date" class = "textbox-n" type = "text" onfocus = "(this.type = 'date')" id = "date">
You can also go for CSS −
input[type="date"]::before{ color: #ffffff; content: attr(placeholder) ": "; } input[type="date"]:focus::before { content: "" !important; }
Advertisements