Stacey Fontenot
asked on
Check if Date Input Field has value, if not add a default
I have a web application that is using html 5. I need to check a date input field to see if it has a value, if not, then add then add the date: (1901-01-01) yyyy-MM-dd. I would like to use javascript. The input date field is below.
html code -------------------------- ---------- ---------- ---------- ---------- ----
html code --------------------------
<input type="date" name="Date_First_Use" id="add_Date_First_Use" class="form-control" disabled />
Based on which event you want to perform the check, after some specific action or on DOM load...
ASKER
I plan to complete after the submit button is pushed. If the value is empty, add the default.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent