Jquery date difference
<p>I have this code for calculating date difference (without weekends) between two input fields, and printing the difference in days in a third text box. The date format is yy-mm-dd (because of mysql).</p>

<pre><code>&lt;script type="text/javascript"&gt;

    $("#vazi_od, #vazi_do").change(function() {       

    var d1 = $("#vazi_od").val();
    var d2 = $("#vazi_do").val();

            var minutes = 1000*60;
            var hours = minutes*60;
            var day = hours*24;

            var vazi_od1 = getDateFromFormat(d1, "yy-mm-dd");
            var vazi_do1 = getDateFromFormat(d2, "yy-mm-dd");


            var newvazi_od=new Date();
            newvazi_od.setFullYear(vazi_od1.getYear(),vazi_od1.getMonth(),vazi_od1.getDay());
            var newvazi_do=new Date();
            newvazi_do.setFullYear(vazi_do1.getYear(),vazi_do1.getMonth(),vazi_do1.getDay());
            var days = calcBusinessDays(newvazi_od,newvazi_do);
      if(days&gt;0)
    { $("#razlika").val(days);}
    else
    { $("#razlika").val(0);}
 });
 &lt;/script&gt;
</code></pre>

<p>But, when i pick the start and the end date, nothing happens in the field that should show the difference in days... Any help?</p>
