Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic One row/task (Read 2397 times)
Ionut Murarasu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: May 4th, 2017
One row/task
May 17th, 2017 at 11:07am
Print Post  
Hello,

Please take a look in the attachment image.
I want to block the user to add more than one appointments in the same task like in the example from the image.
I want to have only one appointment for the same task.
Can Awt Calendar stop the user from extend the task in more than one row ?
  

jPlanner.JPG ( 66 KB | 166 Downloads )
jPlanner.JPG
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: One row/task
Reply #1 - May 17th, 2017 at 12:02pm
Print Post  
Hi,

You can listen to the itemModifying event of the Calendar and ensure that the moved item does not collide with another item. The following code illustrates how:

Code
Select All
calendar.addCalendarListener(new CalendarAdapter() {
	@Override
	public void itemModifying(ItemModifyConfirmEvent e) {
		if (calendar.getSchedule().getAllItems(e.getNewStartTime(), e.getNewEndTime(), e.getResource()).size() > 1)
			e.setConfirm(false);
	}
}); 


Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint