Welcome Guest, Not a member yet? Register   Sign In
Multiple date ranges
#1

[eluser]Samuurai[/eluser]
Hi, I'm working on a recruitment website where users need to be able to specify when they aren't available to work.

The work the candidates will be doing is on weekends only.

I've one idea of how to do it, but I'm just wondering if there's an easier way.

I want it to be very simple.. I could create a table which has all the months of the year and have a checkbox next to Weekend1, Weekend2, Weekend3 etc (i'd use the actual dates of the weekends).

Can anyone think of a better way in terms of usability?

Also, how could I store this data in the DB?

Thanks a lot!
#2

[eluser]kurucu[/eluser]
- Could offer drag and drop between two columns: can and can't
- Allow them to type in the weekend date (or a date) and show/select weekends near it
- As you suggest (checkboxes) but arrange weekends into rows for each month, so a whole year can be shown and navigated easily
- select all in x month, select all other ones, select all in manually typed range and so on.
- allow upload of iCal/other file and pre-select busy weekends
- perhaps a view which works when the window is narrow, so that they can scan between their calendar and your page easily
- remember dates between years e.g. anniversaries and birthdays (that's a feature, not a UI concept)

OR

- a mixture of the above (including none!)

Whatever you do, remember to keep things logical and simple. Dates are presented in a certain way (particularly in order of time, but as weeks/months/highlighted weekends etc) which you should stick to. Use simple, obvious controls and usual etiquette.

Edit: If they are likely to select many, don't force the page to refresh between selections because it'll become tiresome. Offer a big form or ajax selection.
#3

[eluser]Samuurai[/eluser]
I thought I replied agest ago.. I've had some trouble posting to this board for some reason.. sorry for the delay!

Thanks very much for your ideas.. Much appreciated!

I think I will go for a simple table with months down the left hand-side and the weekends running horizontally next to them with checkboxes.

How would you store this data?
#4

[eluser]BrianDHall[/eluser]
My only thought would be to have an available_days column, pack all a users available days into a string for easy use with explode() (for instance: 9-14-09|9-15-09), and then for searching you can use LIKE - which probably isn't terribly efficient, but I would think would work acceptable for this specific sort of purpose.

The only other way I can think of is to use ORM and have a table with values for every day of, say, the next few years (or at least the weekend days - you'd use a script to propagate it, of course), and then 'relate' each person to the days they are available. You can then easily pull all users available on that given day, or all a persons available days...yes, I think that would be ideal for ease in programming and performance, actually. I recommend DataMapper OverZealous Extension, personally.

Either way would work, though, up to you.
#5

[eluser]Samuurai[/eluser]
Thanks a lot! I think to keep it simple i'll use the string approache. It won't be very heavy on DB anyway.

Cheers!




Theme © iAndrew 2016 - Forum software by © MyBB