dimanche 10 juillet 2016

How can i pass a computed date value from success function of ajax to input type text

success:function(data){  
   $('#inputMonthsDue').val("<?php $effectiveDate = strtotime('+"+data[15]+" months', strtotime(date('Y-m-d')));  echo date('Y-m-d',$effectiveDate) ?>");
   $('#inputContractDue').val("<?php $effectiveDate = strtotime('+"+data[16]+" months', strtotime(date('Y-m-d')));  echo date('Y-m-d',$effectiveDate) ?>");                                        
}

i have this code to pass to an input type text but it returns "1970-01-01" guys please help

Aucun commentaire:

Enregistrer un commentaire