Hi Kenneth,
Greetings from Syncfusion.
We have checked your query and in your code you are overriding the grid query property with second parameter(‘toDate’) so the first parameter(‘fromDate’) is not changed. So We suggest to use the below way to achieve your requirement.
[index.cshtml]
<script>
var HourlyChange = function (args) {
if (args.event && args.event.target.classList.contains("e-apply")) {
. . .
var gridObj = document.getElementById("gHourly").ej2_instances[0];
gridObj.query = new ej.data.Query().addParams('fromDate', startDate).addParams('toDate', endDate); // send the query to server
gridObj.refresh();
}
}
</script> |
Please contact us if you need any further assistance.
Regards,
Pavithra S.