Here is how it looks (most left widget):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
const currentHour = new Date().getHours(); | |
const scheduleHour = | |
currentHour < 10 ? 10 : currentHour < 14 ? 14 : currentHour < 17 ? 17 : 10; | |
const addDays = currentHour < 17 ? 0 : 1; | |
const date = new Date(Date.now() + addDays * 24 * 60 * 60 * 1000); | |
const [month, day, year, hour, minute] = document.querySelectorAll( | |
'[role="dialog"] select' | |
); | |
month.value = date.getMonth() + 1; |
Copy paste the script into the console of the submission flow of Google Looker. It's a Google Form, so might work for other Google Forms as well.
Enjoy!
OlderNewer