0

How do I make the Jfxtras Agenda component treat the following two appointments as non-overlapping? Also, is there a way to increase the snap-to-grid granularity of the grid from 5 minutes to 30 minutes, to mimic Outlook? With the 5 minutes precision, it is very difficult to create back-to-back appointments, without making them overlap, or creating gaps between them.

Appointment 1 Start: 2pm End: 5pm

Appointment 2 Start: 5pm End: 9PM

SoupMonster
  • 109
  • 1
  • 10
  • Good question. I need to take a peek. I though I had the end time exclusive, but apparently I do not. – tbeernot Oct 04 '15 at 08:10

2 Answers2

1

I fixed the consecutive appointments rendering issue, the new snapshot should work ok. As for the rounding, I will add a CSS stylable property where this can be set later today.

tbeernot
  • 2,473
  • 4
  • 24
  • 31
  • Yeah, well, I added an integer CSS styled property -fxx-snap-to-minutes (default 5), but for some reason the value is parsed as a double and I get a class cast exception. Very weird. So I can't release that yet. Grrr. – tbeernot Oct 04 '15 at 21:12
  • Thaks dude, I appreciate it :) – SoupMonster Oct 06 '15 at 08:56
  • 1
    If you can't beat them, join them. I am clueless why the CSS parser pushes a double in when I have a integer converter setup. So I now have changed that to double and cast it to integer where needed. -fxx-snap-to-minutes should work now. – tbeernot Oct 07 '15 at 05:58
0

I simply modified the appointment callback. To make it so that only 15 minute segments could be used to make appointments I used dateTimeRange.getStartLocalDateTime().minusMinutes(dateTimeRange.getStartLocalDateTime().getMinute()%15) You can use this for the end time as well, and from then on you will only get appointments made with 15 min intervals. Just change the 15 to change the interval. The only potential downfall is that you could frustrate users if they shoot too low when dragging, but that could be solved as well with a simple if statement.