﻿$(document).ready(function() {  

   $('.jqLoanAmtSection').css({ display: 'none' });

   // Curly Quotes 
   // Go through each element from the quote field with a class of "quote-wrapper".This can be adjusted to any HTML selector you choose, including blockquote elements.
   $('.quote-wrapper').each(function() {
       // Get the text of the span

       $(this).prepend('<span class="bq-start">  </span>');

       $(this).append('<span class="bq-end">  </span>');
   }
    );
   // End Curly Quote code
   if ($(".startdate").length > 0) {
        var startdate = $(".startdate").val();
        var nextpaydate = $(".nextpaydate").val();
        var nextpaydate2 = $(".nextpaydate2").val();

        var arrstartdate = startdate.split(",");
        var arrnextpaydate = nextpaydate.split(",");
        var arrnextpaydate2 = nextpaydate2.split(",");

        $(".paydate-picker").datepicker
    ({ dateFormat: 'dd/mm/yy',
        minDate: new Date(arrstartdate[0], arrstartdate[1], arrstartdate[2]),
        maxDate: new Date(arrnextpaydate[0], arrnextpaydate[1], arrnextpaydate[2]),
        beforeShowDay: $.datepicker.noWeekends

    });

        $(".paydate-picker2").datepicker
    ({ dateFormat: 'dd/mm/yy',
        minDate: new Date(arrstartdate[0], arrstartdate[1], arrstartdate[2]),
        maxDate: new Date(arrnextpaydate2[0], arrnextpaydate2[1], arrnextpaydate2[2]),
        beforeShowDay: $.datepicker.noWeekends

    });

    };

});



