I really like your widget. The design is pretty well what I was looking for.
But I have one issue. Maybe I couldn’t find the right settings.
I have limited the events to 3. But when there are only 2 events at a given time loaded into openhab via the caldav binding, I see for the 3rd event all text positions as UNDEF.
Since I have a lot of recurring events in my calendar, I can’t replicate this behavior. Actually, I’m not sure if I could replicate it (UNDEF item state), even if I delete all my events, because I’m not using CalDAV, but a Python script to collect Google Calendar events. What you could try, if you know how to edit a custom HABPanel widget, is adding ng-if to single event div section. Right now it looks like this:
So, the important part is: <div ng-if="(itemValue(config.CalendarEvent1StartDateTime) != 'UNDEF')" class="row">
Of course, you should do that for all 5 sections, and change config.CalendarEvent1StartDateTime accordingly (Event1, for the first section, Event2 for the second etc.)
Hope this will help you find a way to tune widget to your liking.
I think your widget is great and would like to use it as well. How do I define the items to show the next 5 calendar entries, even if the next 5 are all on the same day.
Davor and Community,
I have prepared a version that looks simpler in number of changes that suppresses the UNDEF and NULL lines. Use it for your convinience:
Hi guys, I have installed this widget and I am very happy with it.
Maybe someone can explain me if it´s possible to add a title to this widget. (e.g. family calendar, personal calendar etc.)
Thanks,
Tobi
thanks for this calendar widget.
I really like it.
However, I would like to tweak it to better fit my screen, but I failed.
I tried to create a stripped down version with just one entry.
So I deleted the entries at the bottom handling the drop down menues for 2,3,4 and 5.
This does not work though (empty screen), so I assume, that I need to delete / modify something in the beginning of the json file.
If anyone prepared a single entry calendar widget, I’d greatly appreciate if you could share is here.
Thanks a lot for your help!
I got it!
Only one thing does not work yet: <div ng-if="((itemValue('CalStart9') | date:'dd.MM.yyyy') < (itemValue('CalEnd9') | date:'dd.MM.yyyy'))" class="calduration">All day</div>
Hmm, yeah I mean it should work but to be honest I haven’t spent a lot of time trying all the variations of multiple day events, or events that cross into the next year.
Is it just the start and end times that are not showing?
Actually it should show “All day” if the entry is set to a full day.
My appointments are actually set to midnight as the “all day” meetings in outlook are created (move them over to icloud afterwards).
So this is the result for “all day” entries:
Dec 25th to Dec 28th -> All Day (works as expected)
Dec 25th to Jan 2nd -> no entry (not NULL / UNDEF - just nothing)
Dec 25th to Dec 31st -> no entry like case 2
Because the 3rd case ends on 31st at midnight, I assume that that’s the magic point.
However, I don’t get it, when the following is not true: ng-if="((itemValue('CalStart9') | date:'dd.MM.yyyy') < (itemValue('CalEnd9') | date:'dd.MM.yyyy'))
e.g. in the 2nd case 25.12.2019 shold be smaller than 02.01.2020, because the year is taken into account.
Yeah it should be working, I noticed a 3 day event I have is also not showing anything. It won’t show undef of Null as the ng-if will only show something if it is a true statement. If it doesn’t match the if statement it will just not show anything. That tells me that somehow the logic is not actually registering the earlier date as an earlier date or less than the former. Need someone more knowledgeable than me to work this one out…
I tried to check if the start time is 00:00, but wasn’t successful checking a few syntax’
Any suggestion how this should look like? <div ng-if="((itemValue('CalStart14') | date:'HH:MM') == '00:00')" class="calduration">{{itemValue('CalStart14')| date:"dd.MM."}} - {{itemValue('CalEnd14')| date:"dd.MM."}}</div>