Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
How can I display a placeholder for input type=date?

let dueDate = document.getElementById('dueDate')
dueDate.innerHTML = "date"
  <input type="date" id="dueDate" placeholder="Date" class="dueDate"></input>

I have this simple input field of date, and instead of the outside looking like "yyyy-mm-dd" I want it to display "date" and when a date is picked it then displays the date,

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The placeholder doesn’t work for date type input so you can use onfocus() inside text input field

<input type=“text” placeholder=“date” onFocus=“this.type=date”>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!