|
function onActionComplete(args) {
if (args.requestType == "dateNavigate") {
var maxIndex = this.getCurrentViewDates().length - 1;
var srtDate = this.getCurrentViewDates()[0];
var endDate = this.getCurrentViewDates()[maxIndex];
console.log("StartDate : " + srtDate.toLocaleString() + " and EndDate : " + endDate.toLocaleString());
}
} |
Hi Jose,
Greetings from Syncfusion Support..!
We have validated your shared query “when i change the month this variables have the previus month” at our end. And we suspect that which changing the Scheduler dates through tabs/button you need to get the start date and end date of the scheduler every time. And for the same, we have prepared a sample using actionComplete event and it can be viewed from the following link.
Code snippet:
function onActionComplete(args) {if (args.requestType == "dateNavigate") {var maxIndex = this.getCurrentViewDates().length - 1;var srtDate = this.getCurrentViewDates()[0];var endDate = this.getCurrentViewDates()[maxIndex];console.log("StartDate : " + srtDate.toLocaleString() + " and EndDate : " + endDate.toLocaleString());}}
Kindly try the above solution and get back to us if you need any further assistance.Regards,Hareesh