Fullcalendar customizing the Agenda display - fullcalendar

I want to make three changes to the fullcalendar Agenda view.
Remove start time from events, essentially I just want to display the title in each slot.
Change the height of timeslots, I have tried adjusting the contentHeight but that had no apparent effect.
Show 30min slots on Y-axis, I know about axisFormat option but it still only displays the full hours.
If anyone can give me any suggestions on how to accomplish these 3 changes?

Fullcalendar have rich callback set to configure:
You should use eventRender to modify it (hide title in already constructed is best way of it). Do not try construct new element and replace original
The same eventRender where you can add CSS or class and then change per event or direct from CSS
Agenda view does not have time slots at all, it is time-ordered list which does not represent proportion of time-lenght between events. If you wan't time based view, then try singe day view and set slotDuration as close as you want, even on the fly with buttons or keybind. + when setting slotDuration, if you wan't support adding events, change also snapDuration

Related

Is any way to change the year faster from a datePicker element in javaFX?

I'm working with javaFX - in particular the datePicker node and I was just wondering, instead of incrementally changing the date via mouseclick in the datePicker popup menu, is there a faster way of changing the year?
I was hoping there would be a way to make the year field editable but I was unable to find such a solution.
You might just add a second control to set the year more quickly with the mouse and then coordinate the display (model) of both controls.

How to render one single event over all sources in timeline view in Fullcalendar?

Is here a option how to render one single event over all sources in timeline view in Fullcalendar v4? So it should look like this:
Only solution I figured out is add this kind of event always to the first source and set its height to 100% height of container. But it is a little dirty workaround, so I wonder if there is any more systematic solution.

FullCalendar - week view events display vertical order

Is it possible to show the events one below the other like the image?i want view week with events vertical order
sorry my English is not perfet
No, it is not possible without editing the source code of fullcalendar.
The best you can do is set eventOverlap: false so that users at least cannot drag and drop the events to have the same time.
You can also try fullcalendar's scheduler plugin which will do almost the same. Search the documentation for vertical resources layout.

Full Calendar agenda view with many all-day events

I am using full calendar in a new web app and have ran into a problem once we deployed. On the Agenda view with the all-day slot enabled the all-day slot expands as events are added. this did not present any issues during our initial test but we have ran into a problem with many events. The all-day slot continues to expand eventually making the agenda view disappear or be too small to be functional. Is there a work around to add a scroll bar to the all-day tab or set a min height for the agenda view? I have tried everything I can think of and have been unable to get anything to work. Please see attached screen shot from the calendar test files.
While you can restrict the size of the all day section my modifiying it's class. The events themselves are positioned by absolute x - y coordinates on the page and aren't actually inside the all day section at all, so scrolling that box would be pointless anyway.
I'd say without modifying the source considerably this is not possible.
I'm not sure what you mean by setting a min-height?

How to update a QLayout and get the new dimensions before returning?

This is driving me nuts. I have a custom menu class that, when set visible, shows a list of items located in a particular folder. When a hardware button is pressed, my application gets the latest list of items, populates the menu with them, and returns.
The menu displaying these items uses a QListWidget filled with custom widgets. Each of the widgets contains one or more QLabels in a horizontal layout, and is created at the time the menu is shown. In order to adjust the text displayed based on the menu width available, I need to get the size of the QLabel AFTER it has been resized according to the layout, but before the menu becomes visible to the user. The problem is, my layout does not get updated until all of the functions constructing my list return.
I have tried QApplication::ProcessEvents() and the layout update functions, but none of them have updated the values of my QLabels before returning. I can set a QTimer when the button is initially pressed, and have it show the menu, update the items, and stop itself, but that seems like a terrible solution.
Any help would really be appreciated! I've spent most of a day on this.
Marlon
I had this exact problem and could not find an answer anywhere on the Internet. Calling Layout.update(), Layout.activate(), or widget.adjustSize() (all suggested in various places) all did not work.
I had a widget with a vertical layout that I wanted to add a QLabel to and then immediately use the size of the QLabel.
The only thing that worked reliably was
layout->addWidget(myLabel);
myLabel->show();
size = myLabel->size();
It would seem that layouts will just not recalculate until you either return from a function and allow the Qt event loop to progress or manually call show() yourself.
How to update a QLayout and get the new dimensions before returning?
Don't. You're not meant to do that. It'll drive you "nuts" because you're doing it backwards. Layout updates are handled asynchronously from the event loop. Instead of getting layout dimensions right away, set yourself up to be part of the system. Some options are:
Implement a custom widget that will interact properly with the layout, growing to fill the available width of the layout. Perhaps all you need is a size policy and a way to elide text?
Make a custom layout that takes the special properties of your use case into account.
You want to call QWidget::adjustSize() on your parent widget. This will force the layout recalculations.
Have you tried using layout()->update(); ?
I've tried many but nothing works for me on Qt 5.15.
Only invented little patch - create timer and get size after 20 msec:
QTimer::singleShot(20, this, [this]
{
const auto height = myLayout->contentsRect().height();
// ...
});

Resources