Minimum height for short (e.g. 5 minute) appointments

Discuss issues related to v3.x
Post Reply
User avatar
gmo
Posts: 6
Joined: Fri Sep 18, 2015 3:18 pm

Minimum height for short (e.g. 5 minute) appointments

Post by gmo » Fri Jan 20, 2017 1:23 pm

Is it possible to set a minimum height for appointments that are very short (e.g. 5 minutes).

Example (Bryntum Scheduler):
The appointment appears with a height of 2 pixels.
Image

Example (other calendar application):
The appointment appears with a minimum height equivalent to 30 minutes.
Image

Thank you!

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3060
Joined: Wed Jan 08, 2014 11:46 am

Re: Minimum height for short (e.g. 5 minute) appointments

Post by Maxim Gorkovsky » Fri Jan 20, 2017 3:07 pm

Hello.
You can provide eventRenderer to your scheduler and change calculated height in templateData argument.

User avatar
gmo
Posts: 6
Joined: Fri Sep 18, 2015 3:18 pm

Re: Minimum height for short (e.g. 5 minute) appointments

Post by gmo » Fri Jan 20, 2017 4:04 pm

Thanks for your reply!

I tried that, but then the events do not correctly overlap.
It seems like the overlapping logic is executed before "eventRenderer".
Example:
Image

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3060
Joined: Wed Jan 08, 2014 11:46 am

Re: Minimum height for short (e.g. 5 minute) appointments

Post by Maxim Gorkovsky » Fri Jan 20, 2017 4:46 pm

Yes, my suggestion doesn't take into account overlapping events. To handle it nicely you can modify event layout. Check Sch.eventlayout.Vertical, see how it works, implement new eventlayout, provide as a config to view. If you search our forum on that matter, you can find more info. Check Sch.eventlayout.Horizontal for inspiration. You can also hire us to implement this, in that case please contact sales at bryntum.com for a quote.

You can also try to work around this presentation issue, here're couple possible solutions:
1) create wrapping event - that will start at the same time, lasting as long as it has to to be drawn nicely. when event is clicked - display info about wrapped event instead.
2) handle it on data level - set some minimum duration so events will always be visible, pass real end date in different field, use real end date field in your logic.

User avatar
gmo
Posts: 6
Joined: Fri Sep 18, 2015 3:18 pm

Re: Minimum height for short (e.g. 5 minute) appointments

Post by gmo » Fri Jan 20, 2017 5:19 pm

Thanks for your great support. Very helpful.

Good to know that we can hire you for this. I will create a budget request in my company.

One last question:
I registered a new preset using:

Code: Select all

Sch.preset.Manager.registerPreset("custom_weekschedule", {
		"timeResolution": {
			"unit": "mi",
			"increment": 15
		}
}
...but it still shows the lines in the vertical time axis in 30 minute steps. Drag&drop works using the new timeResolution.
Image

User avatar
mats
Core Developer
Core Developer
Posts: 15590
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Minimum height for short (e.g. 5 minute) appointments

Post by mats » Sat Jan 21, 2017 4:38 pm

To change the timeAxis, look at 'viewPreset' in our docs. View presets define how the time axes are created.

http://bryntum.com/docs/scheduling/5.x/ ... ViewPreset
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3060
Joined: Wed Jan 08, 2014 11:46 am

Re: Minimum height for short (e.g. 5 minute) appointments

Post by Maxim Gorkovsky » Mon Jan 23, 2017 9:58 am

In week view cells always have middle line. It doesn't depend on view preset/time resolution.
You can add CSS to hide that line and using lines plugin draw lines inside of cells according to time resolution. You will have to calculate date/time for each line.

Post Reply