jquery - click next previous button wd calendar append duplicate values -
i using jquery calender plugin.
the problem whenever seek refresh info clicking on refresh button gives me duplicate values.
my jquery:
//previous date range $("#sfprevbtn").click(function(e) { var p = $("#gridcontainer").previousrange().bcalgetop(); if (p && p.datestrshow) { $("#gridcontainer").reload(); $("#txtdatetimeshow").text(p.datestrshow); } }); //next date range $("#sfnextbtn").click(function(e) { var p = $("#gridcontainer").nextrange().bcalgetop(); if (p && p.datestrshow) { $("#txtdatetimeshow").text(p.datestrshow); } });
you need clear calendar info first before appending new data. seek next code:
$("#gridcontainer").empty();
you can find documentation wdcalendar plugin here: documentation
jquery calendar
No comments:
Post a Comment