Solved FullCalendar Viz missing colour

Not sure if we are talking about the same thing.
In the old FC I never got an endtime in the event display (in the calendar itself, I dont mean the simple popup).

But the end date's time selector is needed.
 
OK, so the question is, what should we display and when? Do we configure a second option for end time or something else.

If we use 2 options for the start/end format, a setting of () means do not show, so we could actually ignore the date/jdate show time selector option as far as FC display. Not difficult to implement, should I?
 
Is showing the end time in the event a FC option at all?
If yes, I think the most flexible would be an "End time format", defaulting to empty for compatibility with the old FC.
Or is it easier to handle an "Display Endtime" Yes/no option?
 
In my old FC, I simply set the start date, since I didn't need a start or end time, and by setting only the start date the event passed as a whole day, i.e. ending at midnight of the same day.
(there is also a setting to select if the event is all day, so in this case the end time is not needed in that context)

This is my use case of course.
But the rule of setting a start and end time (optional) is correct.
For example to register an appointment from 06:00 to 06:30

However, generally speaking, currently if you only set a start time, the label is shown, so the color should still come through.
 
if you need to show the color you can stall with this

CSS:
.fc-event {
    background-color: #fff; /* change with your color */
}
(if that doesn't work, apply !important)
Thanks elmarra, but where to put this code
and
If I have two list in the FC viz and I want to have them different colors as background, is that possible?
Good to know: I am far from a CSS expert
 
Thanks elmarra, but where to put this code
and
If I have two list in the FC viz and I want to have them different colors as background, is that possible?
Good to know: I am far from a CSS expert
You must insert this code (css) in your custom css file or in the template settings.
If I have two list in the FC viz and I want to have them different colors as background, is that possible?
Yes it is possible.
By setting the status element.
Based on the values of that element, with a css rule you can set a custom color
 
I don't believe it should be necessary to have some custom css definitions for the color (even if this is possible). Basically the color selected in the visualisation should be applied.
But as I'm just fiddling around with the calendar time settings (result will be another thread), I have seen following: as soon as the start and end date are in one day the color is not displayed. If the end date is on the next day, the correct color is displayed.

Edit: the color is only missing in the months view. Week and day view are ok.

1729707466340.png
 
Yes @wezetel that is indeed really what is happeing.
Because all my events where only on one day I never saw this happen.
On the Viz's that had color I onlu entered more then one day.
Knowing this it must be more to repair this behaviour (I hope)
 
In the old FC the label had the color regardless of the data set, because in its css it had a default color.
So even if you didn't set anything the label had the color from the css.
I don't think it was the correct configuration, but that's why it happened.
If you set that old css class, you get the color even without configuring the start and end times correctly
 
Last edited:
So after some research it appears that the background color is only being applied to events which span more that one day, more specifically span midnight from one day to the next. I have fixed this issue.

Another issue that has arisen though is that the text color of the label changes when the event spans a midnight. It goes from black to white and makes it hard to see. I have added some code to fix the label color, at this point to black. However, depending on what color one chooses for the background, black may not be the best text color.

So I propose adding a second color option for the label (default black( and change the name of the color option to background color. This give users all the flexibility they need.

And following along with the previous discussions on times, I will add another option for end time format and setting this to () will mean it should not be shown.

Anyone wish to tweak this at all before I jump in and make it so?
 
Quindi propongo di aggiungere una seconda opzione di colore per l'etichetta (nero predefinito) e cambiare il nome dell'opzione di colore in colore di sfondo. Questo dà agli utenti tutta la flessibilità di cui hanno bisogno.
Ok so then the label will be unique with these settings right?
For me what you proposed is fine
 
Unique per data source since each datasource may have a unique background color, the text colour may need to be adjusted per the users needs.
 
And following along with the previous discussions on times, I will add another option for end time format and setting this to () will mean it should not be shown.
Don't get this. Where will be this option?
Currently we have in the data source the field 'All Day Element'. Will it be similiar a 'No End Time' field (Y/N element)? For correct presentation in week/day view it should internally be set to 23:59:59.
 
@wezetel I think I have the color issues resolved and the date/time/timezone issues resolved. I am going to pm you a link to my test site where you can see it in action. Please play with it and see if I missed anything. You can log into the admin as well with your usual ID.
 
@wezetel I think I have the color issues resolved and the date/time/timezone issues resolved. I am going to pm you a link to my test site where you can see it in action. Please play with it and see if I missed anything. You can log into the admin as well with your usual ID.
Can you also let me know if the days of the week show in english or some other language. Reading the documentation on FC it seems it should localize this based on your browser settings.
 
Hmm, as J! may be multilingual I think it should be based on the J! language selection (as it was with the "old" FC).
 
And this is a per user thing (defaulting to system language if not individually chosen). Should be easy to implement.
 
Back
Top