Two week view in Calendar in Yosemite

M

MacInWin

Guest
This tip worked in Mavericks, but doesn't seem to work in Yosemite:
To get your display in Calendar to show two weeks, in Terminal enter:

defaults write com.apple.iCal CalUIDebugDefaultDaysInWeekView 14
Anybody know how to do that in Yosemite? I miss my two week view.
 
Joined
Oct 19, 2014
Messages
1
Reaction score
0
Points
1
Any fix for this?

Any luck finding a fix for this? I used the previous hack also, and really needed a two- or three-week view in Calendar. Really disappointed it no longer works.

Looking for a fix for Calendar or a calendar app that syncs with iCloud that shows me more than one week out.
 
OP
M

MacInWin

Guest
Nope, no responses, no fix I can find. Sooner or later somebody will figure it out, I hope.
 
Joined
Oct 21, 2014
Messages
1
Reaction score
0
Points
1
boom

I found it!

Code:
defaults write com.apple.iCal n\ days\ of\ week 14

BOOM!
 
Joined
Nov 2, 2014
Messages
10
Reaction score
0
Points
1
Location
Bellingham WA 98226
Your Mac's Specs
iMac 2009, Macbook Pro 2012
Didn't work

I tried the given command and got a string of errors.
$ defaults write com.apple.iCal n\ days\ of\ week 14
2014-11-02 01:09:52.670 defaults[82982:1076364]
The domain/default pair of (/Users/al/Library/Preferences/com.apple.iCal, n) does not exist
2014-11-02 01:09:52.764 defaults[82984:1076493]
The domain/default pair of (/Users/al/Library/Preferences/com.apple.iCal, n) does not exist
2014-11-02 01:09:52.854 defaults[82986:1076517] Unexpected argument of; leaving defaults unchanged.
2014-11-02 01:09:52.940 defaults[82987:1076533]
The domain/default pair of (/Users/al/Library/Preferences/com.apple.iCal, n) does not exist
2014-11-02 01:09:53.033 defaults[82989:1076555]
The domain/default pair of (/Users/al/Library/Preferences/com.apple.iCal, n) does not exist​

I also tried adding a key "n days of week" to com.apple.iCal.plist by hand; that didn't work either.
 
OP
M

MacInWin

Guest
What version OS X? The command worked for me in Yosemite. The commands in the first post worked in Mavericks.
 
Joined
Nov 2, 2014
Messages
10
Reaction score
0
Points
1
Location
Bellingham WA 98226
Your Mac's Specs
iMac 2009, Macbook Pro 2012
What version OS X? The command worked for me in Yosemite. The commands in the first post worked in Mavericks.

I just upgraded to 10.10 Yosemite. The first post version worked in Mavericks for me, too.

The new command seems to be incorrect Unix syntax - it is taking "n" as a separate operand. Shouldn't there be some sort of quote or escape character in there somewhere? I just copied and pasted - is there an invisible char?
 
Last edited:
OP
M

MacInWin

Guest
I literally cut and pasted the command into Terminal. Didn't try to type it myself, and it worked first time! I remember I had to close Calendar and restart it to see it take hold. I may even have rebooted. Definitely got zero error messages.
 
Joined
Nov 2, 2014
Messages
10
Reaction score
0
Points
1
Location
Bellingham WA 98226
Your Mac's Specs
iMac 2009, Macbook Pro 2012
That is truly peculiar, then. On my machine the command is not even being parsed correctly on the Unix shell level (forget about Mavericks or Yosemite).

Could you be using a different Unix shell? My Terminal windows have "bash" in the title bar (which I believe refers to something called the Bourne shell) - does yours?
 
Joined
Nov 2, 2014
Messages
10
Reaction score
0
Points
1
Location
Bellingham WA 98226
Your Mac's Specs
iMac 2009, Macbook Pro 2012
Aha! Success!

Didn't figure out the problem with the shell command but I worked around it by modifying the plist file for iCal in Library/Preferences, which is where the "defaults" command stores the goodies. Here is the outline:

  1. Quit Calendar
  2. Find the Property LIst file
  3. Make a backup copy of the Property LIst file on the Desktop, just in case you screw the next step up
  4. Edit the Property LIst file
  5. Restart the computer
  6. Open Calendar

For #2: in the Finder, Option-click the Go menu and click on Library; then navigate to Preferences and select "com.apple.iCal.plist". On my machine the full path of this file is
/Users/al/Library/Preferences/com.apple.iCal.plist​

#3: Option-drag the plist file to your Desktop.

#4a: Open the plist file in Property List Editor. On my machine I just double-click and get PLE by default but I'm not sure that this is a standard app - it may be part of Xcode. If PLE doesn't open, you can try the same thing with a standard text editor like TextEdit or BBEdit - see #4b

In PLE you want to enter a new key. They seem to be in alphabetical order so I put mine right before a whole boatload of keys starting with "NS". So select the item before those and click on "Add item"
  • Type "n days of week" in the "Key" column
  • Select "Number" in the "Type" column
  • Enter "14" in the "Value" column
(Actually, I put "10" in the Value column, but that's just me)
Save and close, and proceed to the restart.

#4b If you don't have Property List Editor, you should be able to accomplish the same thing in a simple test editor.
Oops! I'm going to have to take that back - I just opened it in TextEdit and got gibberish. Apparently the file uses a text encoding that TextEdit can't handle, and TextWrangler didn't work, either. It does look fine in BBEdit, though, and they have a free trial offer, I believe (Bare Bones Software | Welcome)

Anyhow, here is what the relevant section of the plist file looks like in BBEdit:
<key>lastViewsTimeZone</key>
<string>America/Los_Angeles</string>
<key>n days of week</key>
<integer>10</integer>
<key>number of hours displayed</key>
<integer>16</integer>
Your job would be to add lines 3 & 4.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top