SELECTED ANSWER
replied on October 5, 2017
Hey,
This should do what you need.
function tableDates()
{
var tbl = $('#q4');
var dateformat = 'DD/MM/YYYY'; //'MM/DD/YYYY';
var startdate;
tbl.find('tr td[data-title="Date"] input[type="text"]').each(function() {
if(startdate)
{
$(this).val(startdate.add(1,'d').format(dateformat));
}
else
{
startdate = moment($(this).val(), dateformat);
}
});
};
$(document).ready(function() {
$(document).on('click','.cf-table-add-row',function() { tableDates(); });
$(document).on('click','.cf-table-delete',function() { tableDates(); });
});
A couple of things you will need to change with it.
1) var tbl = $('#q4'); change '#q4' to the ID of your table.
2) var dateformat = 'DD/MM/YYYY'; change 'DD/MM/YYYY' to the date format you are using for your field
That should be it.
If you have any issues let me know.