I am using jQuery UI and trying to use datepicker. It works well but if I want to set current date to the field then it does not work. I have tried some but no luck. My attempts are below :
My input:
<g:textField id="admissionDate" class="form-control datepicker" name="admissionDate"
required=""/>
Set date attempt on document ready:
$("#admissionDate").datepicker({
dateFormat: 'yy/mm/dd'
}).datepicker("setDate", "08/03/2016");
Also tried:
$('.datepicker').datepicker();
$('.datepicker').datepicker("setDate", "08/03/2016");
It highlight the current date if clicked but no set to text field.