I am using this code
window.onload = function(){
new JsDatePick({
useMode:2,
target:"report_date_start",
dateFormat:"%d-%M-%Y"
});
new JsDatePick({
useMode:2,
target:"report_date_end",
dateFormat:"%Y-%m-%d"
});
};
function dwnyear_click(id)
{
var urls=siteurl+"?action=Date_range&id="+id;
$.ajax({
type: "POST",
url: urls,
success: function(msg)
{
$("#dwn_year").html(msg);
$("#dwnyear_dropdown").css("display","none");}
});
}
<input name="report_date_start" type="text" id="report_date_start" />
<input name="report_date_end" type="text" id="report_date_end" />
I need to load the textboxes to form via ajax, the datepicker is not working. I have used the same datepicker in my site without any problems. How to tackle this problem? I have added ajax code. Onsuccess returns the textfields