Hi I am new to Day Pilot Scheduler.
I have referred this link https://code.daypilot.org/54503/angularjs-timesheet-tutorial-javascript-php
here this link has both javascript (angularjs) and PHP for me, i am working only in angularjs.
so I have replace the PHP function to expressjs.
I have changed little bit in this for entire month showing here I am using only single week preview.
here is my scheduler code
$scope.scheduler = {
viewType: "Days",
showNonBusiness: false,
businessBeginsHour: 9,
businessEndsHour: 17,
cellWidthSpec: "Auto",
scale: "CellDuration",
cellDuration: "15",
useEventBoxes: "Never",
days: 7,
startDate: (new DayPilot.Date().firstDayOfWeek()),
timeHeaders: [
{ groupBy: "Hour" },
{ groupBy: "Cell", format: "" }
],
rowHeaderColumns: [
{ title: "Date" },
{ title: "Total" }
],
onBeforeRowHeaderRender: function (args) {
var duration = args.row.events.totalDuration();
if (duration.ticks > 0) {
args.row.columns[0].html = duration.toString("h") + "h " + duration.toString("m") + "m";
var totalduration=(args.row.columns[0].html)*7;
alert(totalduration);
}
},
};
I tried like this, I am getting NaN
var totalduration=(args.row.columns[0].html)*7;
alert(totalduration);
I want to get total hours in a variable "total variable" can anyone solve my issue