Calendar not display


#1

i use this webmethod for bind gridview through this jquery code

$(document).ready(function(){ BindGridView(); }); functionBindGridView(){ //$('[ID*=search_data]').on('click',function(){ ////varobj={}; ////obj.fromdate=$("[id*=fromdate]").val()); ////obj.todate=$("[id*=todate]").val()); ////obj.regiondrop=$("[id*=regiondrop]").val()); ////obj.GridView1=$("[ID*=GridView1]").val()); //varfromdate=$('[ID*=fromdate]').val(); //vartodate=$('[ID*=todate]').val(); //varregiondrop=$('[ID*=regiondrop]option:selected')[0].value; //varGridView1=$('[ID*=GridView1]'); //varobj={}; //obj.fdate=from; //obj.tdate=to; //obj.region=reg; //Getdataa(obj); $.ajax({ type:"POST", url:"WebForm1.aspx/search_data", //data:JSON.stingify(obj), data:"{'fromdate':'"+fromdate+"','todate':'"+todate+"','regiondrop':'"+regiondrop+"','GridView1':'"+GridView1+"'}", contentType:"application/json;charset=utf-8", dataType:"json", async:true, cache:false, success:function(result){ $("#GridView1").empty(); if(data.d.length>0){ $("#GridView1").append( "<tr><th>OwnerName</th><th>RegNo</th></tr>"); for(vari=0;i<data.d.length;i++){ $("#GridView1").append("<tr><td>"+ data.d[i].OwnerName+"</td><td>"+ data.d[i].RegNo+"</td></tr>");+ } } } }); }

here fromdate and todate is calendar
with above jquery code adn this webmethod code

[WebMethod]
public static DataTable search_data(DateTime fromdate,DateTime todate,string regiondrop)
{
try
{
T1ts=newT1();
var dq=(from vv in ts.tblVe
join rvin ts.tblRevonvv.ID equals rv.ID
join rein ts.tblRionrv.RID equals re.RID
where
re.Region==regiondrop
&& re.StartDate <= fromdate
&& re.EndDate >= todate
orderby
vv.ID,
rv.OwnerName
select new
{
ID=vv.ID,
ownername=rv.OwnerName,
RegNo=rv.RegNo,
}).ToList();
//DataSetdata=JsonConvert.DeserializeObject<DataSet>(dq);
//DataTabledt=(DataTable)JsonConvert.DeserializeObject(json,(typeof(DataTable)));
DataTable ds=new DataTable();
return ds;
}
catch(Exception)
{
throw new Exception();
//GridView1.Visible=false;
//Label4.Text=("NoData");
}
}

when i run this code and try to click fromdate calendar then calendar not visible where i also use this
<scripttype=“text/javascript”>
$(function(){
$("#fromdate").datepicker();
$("#todate").datepicker();
});

check this