How to zoom in on Calendar?

My guess would be that by default with having the, e.g. Show: [12] hours at a time preference in Calendar > Preferences… > General, that will be the only way to change the number of hours shown from within Calendar, regardless of the size of the window. I tested with various combinations of modifier keys and it didn't help to change the number of hours displayed.

That said, I did test doing it programmatically thru scripting and assigning a keyboard shortcut to an Automator Quick Action/Service and it does work.



Alternate Solution

Create two Automator Quick Action/Service, with settings:

  • Workflow receives [no input] in [Calendar]

Add a Run Shell Script action to each, with settings:

  • Shell: [/bin/zsh]
  • Pass input: [to stdin]

Add the following example shell script code to the first one and save it as, e.g.:

  • Zoom out Hours in Calendar

Example shell script code:

deltaHours=2
currentHours=$(defaults read com.apple.iCal 'number of hours displayed')
[ $((currentHours + deltaHours)) -gt 24 ] && exit 0
defaults write com.apple.iCal 'number of hours displayed' -int $((currentHours + deltaHours))

Add the following example shell script code to the second one and save it as, e.g.:

  • Zoom in Hours in Calendar

Example shell script code:

deltaHours=2
currentHours=$(defaults read com.apple.iCal 'number of hours displayed')
[ $((currentHours - deltaHours)) -lt 6 ] && exit 0
defaults write com.apple.iCal 'number of hours displayed' -int $((currentHours - deltaHours))

Notes:

In System Preferences > Keyboard > Shortcuts > Services I assigned each a keyboard shortcut of ⌘K and ⌥⌘K respectively.

In testing, I could press the assigned keyboard shortcut multiple time in a row quickly and have the number of hours displayed increase/decrease.

The example shell script code as currently coded will increase/decrease by two hours with each pressing of the assigned keyboard shortcut.

The example shell script code, shown above, was tested in a Run Shell Script action as an Automator Quick Action/Service with keyboard shortcuts assigned under macOS Catalina and macOS Big Sur with Language & Region settings in System Preferences set to English (US) — Primary and worked for me without issue1.

  • 1 Assumes necessary and appropriate settings in System Preferences > Security & Privacy > Privacy have been set/addressed as needed.



Note: The example shell script code is just that, an example, and sans any included error handling does not contain any additional error handling as may be appropriate, needed, or wanted. The onus in upon the user to ensure the script is fit for use for ones purpose.