var arDatePatchOf=[]; var opts3 = { vars: { altField:"#desde", altFormat:"dd/mm/yy", dateFormat:"dd/mm/yy", firstDay:1, numberOfMonths: [ 1, 2 ], minDate: '07/10/2017', maxDate: '23/12/2017', showDropdowns:false, timePicker:false, singleDatePicker:false, autoUpdateInput:false, autoApply:true, linkedCalendars:true, language: activeLang, locale: { format:"DD/MM/YYYY", firstDay:1, separator:" / "} }, 'backFn':function(start, end, label) { if (activeLang=='ar') { arDatePatchOf[0]=frmtDT(start._d.getDate())+'/'+frmtDT((start._d.getMonth()+1))+'/'+start._d.getFullYear(); arDatePatchOf[1]=frmtDT(end._d.getDate())+'/'+frmtDT((end._d.getMonth()+1))+'/'+end._d.getFullYear(); } $("#desdeo").val(start.format('DD/MM/YYYY')); $("#hastao").val(end.format('DD/MM/YYYY')); } };