I'm wondering if Google has changed something in the calendar API or I'm just nuts... When I look at the data exported for a recurring event, the "end" "dateTime" for the event is the last date of the series. Unless I'm nuts, previously, this value was the end date/time of the first instance of the event. I can manipulate the date so my software is not longer broken, but there is no way that I did not notice this problem before - something got changed I'm pretty sure.
Sample json extracted from Google:
"start": {
"dateTime": "2018-11-26T13:30:00-05:00",
"timeZone": "America/Chicago"
},
"end": {
"dateTime": "2018-12-14T14:30:00-05:00",
"timeZone": "America/Chicago"
},
"recurrence": ["RRULE:FREQ=WEEKLY;UNTIL=20181128T055959Z;BYDAY=MO,TU,WE,TH,FR
Retrieving recurring events with Events: get gives you the end time of the singles event specified by eventId, rather than the final data of the recurrence.
Indeed, your line
["RRULE:FREQ=WEEKLY;UNTIL=20181128T055959Z;BYDAY=MO,TU,WE,TH,FR...
contains UNTIL=20181128T055959Z - showing that the end date for the recurrence is 28th of November 2018, which is before
"end": {
"dateTime": "2018-12-14T14:30:00-05:00", ...}
The only reasonable explanation is that during event creation the 14 of December 2018 was erroneously specified as the end date of a single event occurrence - this is not the end date for recurrences.
Related
I use FullCalendar 5, and I have some events which can long several days.
The default behavior of FullCalendar is to make events to go until midnight, then start at 0:01 the next day.
Is it possible to constraints the events to always start and end at a specific time ?
Here is a fiddle: http://jsfiddle.net/gsuzawqv/
I defined my events like:
events: [
{
title: 'Meeting',
start: '2022-04-13T10:00:00',
end: '2022-04-15T15:00:00',
constraint: 'availableForMeeting', // defined below
color: '#257e4a'
},
// areas where "Meeting" must be dropped
{
groupId: 'availableForMeeting',
startTime: '10:00:00',
endTime: '16:00:00',
display: 'background'
},
]
I want my Meeting event to start and end every day at the constraint I set. For now, it doesn't take care of startTime and endTime.
I'm trying to figure out in firestore what the best way is to query date data for a week. I have objects that span multiples days and i want to know what elements are a part of a particular time span. Right now my data hasa start and end date represented by their unix ms value. Some start before the query start date and some end After the query end date. How am I to properly query this or properly denormalize the data.
For example i want to retrieve all items that occur for this current month, Oct. Some elements might have a start date of Sept 30 - Oct 2 and some might be Oct 31 - Nov 2nd. How do i structure/query my data to include those edge cases?
{
active: true,
address: {
addressLine1: "5 May Way",
city: "Wilmington",
state: "Ny",
zip: "40778"
},
createdOn: 1570558984758,
day: 1570507200000,
event: {
startDate: 1570558945155,
endDate: 1570559945160,
utcOffset: -240
},
id: "6FXSCc8BFqww59PT0HyE",
name: "Test",
portalId: "iHvdmHxsQsQvoaQIO0r4",
statusId: 0,
}
From the top of my head, you may include a field for the months that event happen in (e.g. occurrence). This field would be an array and your query to find out if that event happened in a specific month you could use a where clause where that field would contain the month you are looking for. Something like where('occurrence', 'array-contains', 'October').
That is, you could add to your event field the array occurrence, it would look like this:
event: {
startDate: xxxxxxxxx,
endDate: xxxxxxxxx,
utcOffset: xxx,
ocurrence: [September, October]
}
This would handle both regular and edge cases.
I am using the FullCalendar scheduler and wish to have my calendar set to Agenda Day view, with the option of selecting Week or Month. However, my concern is that the actual day of the week does not show in the default view, only the date as follows:
January 15th, 2018
I really want to have something like:
Monday, January 15th
I don't really even need the year.
The days do appear in week and month view no problem, but I cannot find a setting that allows the day to appear for the day view, which will be extremely useful when users are wanting to skip to 'next Friday' for example without having to consult another view to find out the actual date.
Any ideas?
This is controlled by the "titleFormat" option. You can combine this with view-specific options to change the title only for "day" views:
views: {
day: {
titleFormat: 'dddd, MMMM Do YYYY'
}
},
See http://jsfiddle.net/sbxpv25p/105/ for a working demo.
See also
1) https://fullcalendar.io/docs/text/titleFormat/ (title format option)
2) https://fullcalendar.io/docs/views/View-Specific-Options/ (view specific options)
3) https://fullcalendar.io/docs/utilities/date_formatting_string/ and http://momentjs.com/docs/#/displaying/format/ (characters which can be used to format the date)
With Fullcalendar v5 the syntax changed a little. The format is defined by the local. Weekdays are added by an additional attribute and date formatting:
locale: 'en',
views: {
day: {
titleFormat: {
year: 'numeric', month: 'long', day: 'numeric', weekday: 'short'
},
},
},
See
https://fullcalendar.io/docs/v5/locale
https://fullcalendar.io/docs/v5/titleFormat
https://fullcalendar.io/docs/v5/date-formatting
In my agendaDay view I some times need to display events that do not have an end time:
$(".agenda").fullCalendar({
events: [
{
title: "Start day",
start: '2017-04-19T09:00:00'
},
{
title: "Do some work",
start: '2017-04-19T09:05:00',
end: '2017-04-19T17:00:00'
}
]
});
Such events get rendered as if they lasted two hours:
Is there a way to control that or an alternative feature I should be using?
Docs for v1 mention the exact property I need:
defaultEventMinutes 1.4
Determines the length (in minutes) an event appears to be when it has
an unspecified end date.
Integer, default: 120
By default, if an Event Object as no end, it will appear to be 2
hours.
... but the property is apparently not available on 3.3.1 :-?
In the v2 & 3 API it's been split in two properties, so you can set different values to all day events and timed ones:
defaultAllDayEventDuration
defaultTimedEventDuration
Also, the new properties expect a string with a time ("00:45:00") rather than seconds (2700).
Sample View:
I would like to create a custom year view to show the timeline in every month slots. I can use fullcalendar-scheduler with a custom view and define like this:
views: {
timelineCustom: {
type: 'timeline',
buttonText: 'Year View',
duration: {year:1},
slotDuration: {month:1}
}
}
However, there is no way to set up a fiscal year view with month start at April 1st and end at March 31st next year. And also, a timeline bar will cover a whole month slot even though an event only starts from the second half of that month.
Your first problem - starting the view in April and ending in March of the following year, can be solved using the new "visibleRange" option. This lets you supply start/end dates for the view, relative to the "currentDate" (i.e. the date fullCalendar curently regards as being selected). You also have to set the "dateIncrement" option, to ensure that Next/Previous increment the current date by 1 year.
N.B. This requires fullCalendar 3.3.0 and Scheduler 1.6.0, or later.
timelineCustom: {
type: 'timeline',
buttonText: 'Year View',
dateIncrement: { years: 1 },
slotDuration: { months: 1 },
visibleRange: function(currentDate) {
return {
start: currentDate.clone().startOf('year').add({ months: 3}),
end: currentDate.clone().endOf("year").add({ months: 4})
};
}
}
See https://fullcalendar.io/docs/current_date/visibleRange/ and https://fullcalendar.io/docs/current_date/dateIncrement/ for more details
However, your issue where the timeline bar covers a whole month slot even though an event only starts in the second half of a month, is not really solvable in the way you want. The whole point of "slots" is to be the minimum time that an event can be displayed for in that particular view. If you want it to be more subtle than that, you would have to define shorter slots. The same thing happens in fullCalendar's default "Month" (non-timeline) view - all events cover a whole day even if they're timed, but you can see the times in the description. I see in your example you have already got the dates of those events displayed in the description, so it should be reasonably clear for your users.
I suggest your users click on the Month View to get a more detailed breakdown with the slot durations more accurately displayed. Either that or you have to compromise and set slotDuration to something smaller.