I use bootstrap datepicker. When choosing date, I'd like to add the chosen date +3 excluding weekends (and probably some random date too for holidays) and put it in a textbox. So, if the chosen date is Fri, 25th then the textbox value should be Wed, 30th. This is my current script:
$('.date_get .date').datepicker({
startView : 0,
todayBtn : "linked",
forceParse : false,
autoclose : true,
endDate : "now",
format : "dd/mm/yyyy",
todayHighlight : true,
daysOfWeekDisabled : [0,6]
}).on('changeDate', function (selected) {
//DATE 2 = DATE 1 + 3 Days
var tgl = new Date(selected.date.valueOf() + (1000 * 60 * 60 * 24 * 3)); //Chosen date +3 days
var hr = tgl.getDate();
var bln = tgl.getMonth() + 1; //Januari == 0
if(bln <10)
bln = "0"+bln;
else
bln = bln;
var thn = tgl.getFullYear();
var hari_ini = hr + "/" + bln + "/" + thn;
$('.date_tgt').val(hari_ini);
});