Home Keep input disabled until correct option is selected in html
Reply: 0

Keep input disabled until correct option is selected in html

user450
1#
user450 Published in April 26, 2018, 1:41 pm

I need the 'date' input to be disabled until the 'Deadline' option is selected. I have tried the following but it is not working. Any Suggestions?

CODE

<Select>
  <option onselect="document.getElementById('deadline').disabled = false;">Deadline date</option>
  <option>Monthly</option>
</Select>

<input id="deadline" type="date" disabled>
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.477167 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO