How can a calendar refresh/reload after a event was changed? - google-apps-script

I'm changing a event using the CalendarApp script, but it seems it appears on the Calendar UI only after a random time, ranging from seconds to minutes. Is there a way to force the event to be updated/refresh on the Calendar immediately after it was changed on the script?
I tried using several combinations of
cal.setHidden(true);
cal.setHidden(false);
cal.setSelected(false);
cal.setSelected(true);
CalendarApp.setHidden(true);
CalendarApp.setHidden(false);
CalendarApp.setSelected(false);
CalendarApp.setSelected(true);
but I still have inconcistent results. Any idea?
Thanks in advance.

The calendar service and the calendar Browser Ui are two separate things, they have no relationship except being linked to the same source (the calendar itself), there is no way for a script to interact with the calendar Ui... You can use the refresh button under "more" menu in the upper right corner of Calendar Ui but that is all you can do.

Related

How to create and inject custom fields into Google Calendar UI for certain users?

I want to be able to edit the Google Calendar UI to have custom fields show up when a user is creating an event. I know it is possible to patch events and add custom fields to it after, but I want these custom fields to be defaulted on the user's calendar so anytime they create an event, the options show up. The pop-up I'm talking about is below.
I know that you can use AppScripts to create an add-on on the side of the screen, but I would prefer to have the change made right in the user's main UI. It seems like this is possible, as there is a Zoom add-on that allows you to "Make it a Zoom Meeting" as seen in the screenshot above in the bottom right hand corner.
If anyone could point me towards an example/documentation on how to do this, that would be greatly appreciated. Thanks in advance!
There is a similar question asked here
Where a community member shared a few options such as:
Using a browser extension to inject your custom fields + the Google Calendar API + the OAuth required.
Create your own UI using Google Apps Script CardService and its HTML service.

Need Solution for Full Calendar with list of events and link to specific event page

I'm building my final project for my studies and I'm trying to make an event calendar that shows events in the calendar itself. I found a few solutions so I'm good with that part, I think.
Although, what I want to add is an option so that under my calendar there will be a list of all events for this month (it's a monthly calendar) and the list will match what's showing on the calendar itself.
When someone presses one of the events on the list it will take them to a specific page for the event, and there will be an option to have an open discussion about the event.
Is that possible?
Is it to complex for a beginner to do?
What are my options?

Google Calendar - calendar visibility and groupings

When using Google Calendar in Chrome, there is a 'Display this only' option that will hide all my calendars apart from the selected calendar. I have a list of about 20 calendars so this feature is very useful.
The problem is that to re-enable the visibility of the other 19 calendars, I have to click on each calendar's checkbox (in the left sidebar), one at a time. This is not at all practical when needed a less complicated view for dealing with many events in each of the calendars.
Ideally, what I would like is to have the ability to turn on the visibility of all calendars with one click, but also to group calendars so that I can show and hide groups of calendars with one click. This would work really well with Room and Resource calendars.
I understand that users have been requesting that Calendar natively support these types of features for over 10 years now. From the lack of response on this issue from Google, it seems they don't think this is worth adding, which surprises me considering half of the feature is there with the 'Display this only' option.
So, does anyone know of a way to create visibility groups (or all calendars shown/hidden with a click) programmatically? Maybe with Google App Script? I would appreciate anything that could point me in the right direction.

How to add event in google calendars to user who fill the google form

I want that if some people fill the google form, the new event fall in his google calendar. How it is possible to do?
Here is a web site I used to do the exact thing.
http://www.jessespevack.com/blog/2016/2/9/turn-a-google-form-response-into-a-calendar-event
Follow the steps and its not to bad.

Adding script to a button which can display Time now

Hi I am trying to make a spreadsheet with Button formed through shapes (using Drawing tool) and then assign script to it, to track Start time and End time. Basically the two button side by side would say Start and Stop, when you start working, you click the button and the start time would get recorded and when you click the Stop button it would record the time then as Stop time. I was reading the script tutorial and it said that now() argument is not allowed, is there any other way to do this on Google Sheets, because in Excel it is pretty simple.
Google Apps Script is based on JavaScript : new Date() is the equivalent of now()
Your idea is not bad but these button are not fixed, they move with the page whenever you scroll down...
I'd suggest using the sidebar available in new (standard) version of spreadsheets to place your 2 buttons and the corresponding results.
You can use HTMLService or UiApp to build a pretty user interface in the sidebar.