Hi ,
Thanks for your response. i have some issues listed below
1)I need to enter time while booking when user is in month view mode, In your demo time is removed
2) And one more thing if one person booked the room for a particular time, that time should be disabled to book again, that means 9 to 9.30 is booked already means that time should be disabled in the calendar completely
3)I used a customized function to save data and retrive in a database. I am facing issues like, if am booking from 9.30 to 10.00 in calendar it is showing as 6.30 to 7 and moreover i am having some error in console i have attached the screenshots below
Actually i booked from 9 to 9.30 it is showing as 6.30 to 7 in the calendar.
i have attached my code here
CODE TO GET DATA FROM DB:
{
this.bookingservice.getCalender().subscribe((tabdata:any)=>{
this.getData=tabdata;
console.log(this.getData);
this.eventData=
{
dataSource: this.getData,
fields: {
id: 'Id',
subject: { name: 'event' },
startTime: { name: 'startTime' },
endTime: { name: 'endTime' },
},
enableTooltip: true
};
}
);
}
CODE TO STORE DATA TO DB:
onActionBegin(args: ActionEventArgs): void {
if (args.requestType === 'eventCreate') {
this.title=args.data[0].Subject;
this.fromDate=args.data[0].StartTime;
console.log(this.fromDate)
this.toDate=args.data[0].EndTime;
this.calendarData=
{
userName:this.userName,
emailId:this.emailId,
location:this.locselected,
lab:this.labselected,
startTime:this.fromDate,
endTime:this.toDate,
event:this.title,
}
console.log("add",this.calendarData)
this.bookingservice.book_func(this.calendarData).subscribe((data) => {
this.getCalenderData();
console.log("hitting url");
})
}
}
MY CONSOLE WINDOW IS:
Popup window to is closed if i save the data since it is showing error.
Please take this as a priority issue and help me out