Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Selection Time Unit (Read 4526 times)
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Selection Time Unit
Sep 23rd, 2014 at 8:53am
Print Post  
Hi,
how can I set a time unit for the selection to make
the user select only full day (or half day), avoiding to
select also hours and minutes?
The same time unit must be obviously kept during the appointment move o lenght changing..

Thanks in advance
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Selection Time Unit
Reply #1 - Sep 23rd, 2014 at 11:44am
Print Post  
Hi,

Which view are you using?

Regards,
Meppy
  
Back to top
 
IP Logged
 
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Selection Time Unit
Reply #2 - Sep 23rd, 2014 at 1:06pm
Print Post  
Meppy wrote on Sep 23rd, 2014 at 11:44am:
Hi,

Which view are you using?

Regards,
Meppy


Sorry, I forgot to specify the view: I am using ResourceView mode.
Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Selection Time Unit
Reply #3 - Sep 23rd, 2014 at 1:48pm
Print Post  
Hi,

You can manually enforce full-day selection by handling the Changed event of the Selection class and adjusting the start and end times of the current selection. The following sample illustrates how:

https://mindfusion.eu/_samples/_sample_ResourceViewDescreteSelection.zip

Items are automatically aligned when modified according to the unit specified by the SnapUnit and SnapUnitCount properties of the Calendar.ResourceViewSettings object. The default values (Day and 1 respectively) indicate that items are aligned to the nearest day. To align items to half day you need to set SnapUnit and SnapUnitCount to Hour and 12 respectively:

Code
Select All
calendar1.ResourceViewSettings.SnapUnit = TimeUnit.Hour;
calendar1.ResourceViewSettings.SnapUnitCount = 12; 


Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Selection Time Unit
Reply #4 - Sep 24th, 2014 at 5:00pm
Print Post  
Meppy wrote on Sep 23rd, 2014 at 1:48pm:
Hi,

You can manually enforce full-day selection by handling the Changed event of the Selection class and adjusting the start and end times of the current selection. The following sample illustrates how:

https://mindfusion.eu/_samples/_sample_ResourceViewDescreteSelection.zip

Items are automatically aligned when modified according to the unit specified by the SnapUnit and SnapUnitCount properties of the Calendar.ResourceViewSettings object. The default values (Day and 1 respectively) indicate that items are aligned to the nearest day. To align items to half day you need to set SnapUnit and SnapUnitCount to Hour and 12 respectively:

Code
Select All
calendar1.ResourceViewSettings.SnapUnit = TimeUnit.Hour;
calendar1.ResourceViewSettings.SnapUnitCount = 12; 


Let me know if this helps.

Regards,
Meppy


Thanks Meppy,
this is what I exactly was looking for!!!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint