4

I want the user to be able to specify something like "Tuesday , from 10am till 11am".

Can I do this with one complex control, or would I be better off with 3 separate simpler controls, such as combo boxes, one for day and one each for start/stop times?

Warren P
  • 65,725
  • 40
  • 181
  • 316
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551

2 Answers2

7

Would I be better off with 3 combo boxes, one for day and one each for start/stop times?

Go for whatever solution doesn't require natural language processing. It's less "cool" and might look a bit obsolete, but I bet it's easier for users because they can do all the selection with the mice and always know they get what they want. Natural language is hard, people might miss-spell things, enter impossible data or confusing data. What do you do if they enter something like this:

"Marţi, de la 22 la 21"

(intentionally written in non-English, with reversed hours in 24 hour format!). And don't even think about asking non-native-English speakers to WRITE dates in English, it's torture.

In other words, unless you have Google's ability to process natural languages in multiple languages, go for a plain multi-combo-box setup, with proper editors for each segment: one for date, two for times.

Warren P
  • 65,725
  • 40
  • 181
  • 316
Cosmin Prund
  • 25,498
  • 2
  • 60
  • 104
  • 1
    +1. This is how [Microsoft Outlook](http://privat.rejbrand.se/outlooktimespan.png) does it. – Andreas Rejbrand Mar 08 '12 at 07:48
  • 1
    Make sure to make months non-numeric and write years in full 4 digits as this all too often leads to confusion. 01/02/03 can mean a lot of things, depending on who you ask. Feb. 3, 2001 doesn't have that problem. – Pieter B Mar 08 '12 at 09:56
  • 1
    I personally think that Windows apps should use the format settings specified by the user in the control panel, Pieter. The ShortDateFormat and LongDateFormat should be up to your users, not your developers. In some scientific applications, I force everything to ISO format, but I usually have a checkbox in my configuration of my application "Enforce ISO Dates", and when it's off, I use the native formats. – Warren P Mar 09 '12 at 21:13
  • @PieterB, I assume Mawg's idea was to let the user write time range information in a natural way; Forcing them to use a rigid time format for parsing ease doesn't sound user-friendly! – Cosmin Prund Mar 10 '12 at 05:30
5

The JEDI VCL has a plethora of options.

If you want to be able to do something like the Google Calendar where you can select a range from say, 9 to 11 am visually, on a particular day, you can use the JvTimeFramework (personal organizer) components. For a single day view with times from a particular range to another particular range, the TJvTFDays component is ideal:

enter image description here

You click on the time where you want to start, like Google Calendar does. Then you type "Lunch with dave" and hit enter, then you grab the bottom of the square and drag it up and down to fix the duration, or drag the top of the square up and down to change the start time. If you double click it, you can directly input using a dialog box -- the Add Appointment dialog shown in the screenshot is only one option users have. They can work without that, and just directly input onto the day-timer page control.

Otherwise, if you want to stick to text entry, I would combine several controls, including a JvDateTimePicker.

Check out the examples\JvTimeFrameWork\PhotoOp demo in the JVCL examples folder for the above program.

Warren P
  • 65,725
  • 40
  • 181
  • 316