Jquery datepicker inside gridview indide update panel. Need maxdate of datepicker as the date in another column of that same gridview

Jquery datepicker inside gridview indide update panel. Need maxdate of datepicker as the date in another column of that same gridview

I'm new to jquery. I have a gridview which contain two date columns. In second column
There is datepicker textbox in itemtemplate. I need to set maxdate of datepicker as the date loaded in the first column.
Now it's working as follows. First row. First column date is 30-dec-2017. And 2nd column maxdate of datepicker is same as 30-dec-2017.
But second row working wrongly.
In second row , fisrt column date is 29-dec but second column maxdate od datepickeris 30-dec. All rows datepicker maxdate shows 30-dec.

Please solve this issue. I think by default 1st column's 1st row value taken as maxdate of datepicker.


<link href="../CSS/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="../script/jquery-1.10.2.js" type="text/javascript" language="javascript"> </script>
<script src="../script/jquery-ui-1.10.4.custom.min.js" type="text/javascript" language="javascript"> </script>



function BindEvents() {
$('document').ready(function() {
$('.date').datepicker({
dateFormat:'dd-M-yy',
changeMonth:true,
changeYear:true,
yearRange:"-3:+20",
maxDate:$('.mindt').val()
});
$('.date').datepicker("option","showAnim","clip");
});
}

This function Bindevents called inside gridview.

<asp:"UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<script type="text/javascript">
Sys.Application.add_load(BindEvents);
</script>