Datetime Dynamic min?
-
Hello, it’s me again.
I am trying to use jquery to set a min-date for the datetime field.
However, it does not seem to be working. Does your plugin support jQuery?
Here’s what I’m trying to do:
<input type="datetime-local" name="test" id="timetest" required/>
And the script:
<script> jQuery(document).ready(function(){ elem = document.getElementById("timetest") var iso = new Date().toISOString(); var minDate = iso.substring(0,iso.length-1); elem.value = minDate elem.min = minDate }); </script>
The error returned is that jQuery is not defined…which is strange
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Datetime Dynamic min?’ is closed to new replies.