I have two text boxes , I want dates to be populated as 6 months back and 15 days ahead date from current date. I am able to select default date in datepicker , but not able to set the default date to text box
$("#fromDate").datepicker({ dateFormat: 'yy-mm-dd',defaultDate : '-6m' });
$("#toDate").datepicker({ dateFormat: 'yy-mm-dd',defaultDate: '+15d' });
Please find fiddle here : datepickerIssue
Thanks
inputtag before selecting the date?