Calendar Recurring Rules UI
Date: 19/12/2006
I had a read of the iCalendar RFC and decided that my previous recurring UI attempt was not flexible enough, and so I redesigned the UI somewhat. This is a shot from my UI builder, obviously it'll be nicely laid out at runtime:

This time around I've added more control, although I think it's harder to understand what everything does. Basically I'm trying to expose these fields:

	freq = [daily, weekly, monthly, yearly]
	repeat = [int]
	by day = [mon,tues,wed,thur,fri,sat,sun]
	by month = [1,12]
	by year = [year,...]
	by pos = [int]

	date = [dd/mm/yyyy]
	count = [int]

Basically the first 2 fields, "freq" and "repeat" generate a list of days, which then gets limited by the "By Day", "By Month", "By Year" and "By Pos" fields.

So if you wanted all the fridays in Feb, you would set Freq=Day, Repeat=1, ByDay=Fri, ByMonth=Feb.

If you wanted the 3rd Saturday in every month, StartDate=a saturday, Freq=Week, ByPos=3

Can you think of some important cases that aren't covered by this UI?
18/12/2006 6:47am
last friday of each month?
18/12/2006 6:48am
(it's when i get paid)
18/12/2006 8:56am
daily + repeat 1, byday = fri, bypos = -1

bypos = -1 means "last" in the iCalendar spec. I may make this a drop down hint or something.
18/12/2006 12:14pm
"So if you wanted all the fridays in Feb, you would set Freq=Day, Repeat=1, ByDay=Fri, ByMonth=Feb."

why would freq be Day, not week?

i'm sure it's correct but it is harder to understand (as you said).
But i think it will all make more sense once one can actually see the result, and try a few.

and a few examples in the help file would help a lot, there are not that many variations.
18/12/2006 9:12pm
I think you could also get away with setting the start date to a friday, freq=weekly, interval=1, bymonth=feb.
19/12/2006 2:35am
I think I'll change the freq/interval lines to read:

Repeat Every: [1] [Day(s)]

Where the first field is the interval and the second is the freq. I think that reads better.
Email (optional): (Will be HTML encoded to evade harvesting)
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.