I would like to set the value of the date picker field to be the current date by default. So every time I add a new row, i want that row to show the current date in the datepicker input field.
Thanks and let me know if you need any other information. I have the following code in my instructions field per this post:
<script>
document.getElementsByClassName('hasDatepicker').value = (new Date()).format("m/dd/yy");
</script>
But that doesn't seem to be working.
/* EDIT */ I tried to adjust my code a bit to see if that worked, but it didn't. I am trying to avoid JQuery just in case ther is a loading issue.
<script>
document.getElementsByClassName(''matrix-add").addEventListener('click', function() {
document.getElementsByClassName('event_helper_date').value = (new Date()).format("m/dd/yy");
});
</script>