views:

2959

answers:

18

What is the best method for date of birth selector?

  • 3 text inputs (month / day / year) or one mask input. User MUST use keyboard
  • 3 select boxes. User can use keyboard or mouse.
  • One nice datepicker.

I want to know what is the most usable and problem free solution, so user wont be confused at all.

+12  A: 

For an advanced user text input is the best, if the user knows the date format, it is very fast. For a not so advanced user I suggest using a datepicker. Since usually you also have advanced and non-advanced users I suggest a combination of text input and datepicker.

asalamon74
The problem with most datepickers is that it's painfull to go back 30/40/or more years.
Unkwntech
Although now that I look at the one he offered I guess its not to bad.
Unkwntech
Date picker is actually a terrible user experience when entering DOB, because of the need to go back several years as mentioned by Unkwntech. Plus, a date time picker puts value of the location of a particular date relative to the structure of the month and week, which is not needed when picking a DOB.
Alex Czarto
A: 

I would take a DatePicker. It's the only component that allows expert users to enter it manually and guides novices to enter a date very easy.

The calendar should not pop up if you enter via pressing tab, but clicking on a button. So no expert user is annoyed of it.

furtelwart
+2  A: 

Put both and make each update the other. If the user chooses the date from the datepicker, it is easy to fix a minor misclick in the text field or visualize the choise you typed into text field in the datepicker.

Tuminoid
i can't put both, won't fit into design :) I need only one of those.
Ionut Staicu
Since the datepicker needs javascript, use javascript to show it only when needed. Set the position to absolute so it will float over all other elements.
some
Normally you just put the text field and attach the icon next to it which pops up the datepicker.
Tuminoid
A: 

I would prefer a datepicker (and a input box with documented format as a fall-back) for an international site.

Date formats vary and are sometimes hard to read if you are now used to them. Too bad many people aren't comfortable with ISO 8601. :-(

stesch
+2  A: 

I would also recommend the combination of DatePicker and fields

See this demo, where the date picker does reflect the date entered in the fields by the user.
It is based however on a DatePicker using Prototype and Scriptaculous though. I mention it for illustration purpose.

VonC
+1  A: 

I normally use both -- a datepicker that populates a textfield in the correct format. Advanced users can edit the textfield directly, mouse-happy users can pick using the datepicker.

If you're worried about space, I usually have just the textfield with a little calendar icon next to it. If you click on the calendar icon it brings up the datepicker as a popup.

Also I find it good practice to pre-populate the textfield with text that indicates the correct format (i.e.: "DD/MM/YYYY"). When the user focuses the textfield that text disappears so they can enter their own.

Stewart Johnson
A: 

(Assuming you're using ASP.Net...)

I would recommend a TextBox combined with

  • ASP.Net AJAX Calendar Extender (on the demo try clicking on the Month of the calendar)
  • ASP.Net AJAX Watermark Extender
  • ASP.Net RegularExpressionValidator
  • ASP.Net RequiredFieldValidator

Thus:

<ajax:TextBoxWatermarkExtender ID="txtBirthDate_TextBoxWatermarkExtender" runat="server"
        TargetControlID="txtBirthDate" WatermarkCssClass="watermark" WatermarkText="DD/MM/YYYY" />
<ajax:CalendarExtender ID="txtBirthDate_CalendarExtender" runat="server" TargetControlID="txtBirthDate"
        FirstDayOfWeek="Monday" Format="dd/MM/yyyy" />
<asp:RequiredFieldValidator ID="txtBirthDate_RequiredFieldValidator" runat="server"
        ErrorMessage="Please select a date" ControlToValidate="txtBirthDate" CssClass="validator"
        Display="Dynamic" EnableClientScript="true" ValidationGroup="YourValGroup"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="txtBirthDate_RegularExpressionValidator" runat="server"
        ErrorMessage="The date must be entered in the format DD/MM/YYYY" ControlToValidate="txtBirthDate"
        CssClass="validator" Display="Dynamic" EnableClientScript="true" ValidationGroup="YourValGroup"
        ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"></asp:RegularExpressionValidator>

This might look a bit overloaded in your aspx file, but it makes for a nice simple user experience, that degrades gracefully (still works) if JavaScript is disabled.

You'd probably want to add a RangeValidator to prevent the user from selecting dates in the future as well.

Richard Ev
How about a comment to accompany the vote down?
Richard Ev
i'm not the one who down vote, but i don't use asp (i didn't mention though). In fact, it's a general question, not specific to a language or another ;)
Ionut Staicu
No worries - there are certainly plenty of other datepickers out there (we've found quality issues with a lot that we've looked at though) and I'm pretty sure there's a jQuery watermarker out there as well.
Richard Ev
A: 

I would suggest using a drop down menu for each field, making sure to label each as day, month and year. A date picker might also help, but if the user doesn't have JavaScript enabled, it won't work.

Philip Morton
Because is a site full of javascript, there is no chance for ANYTHING to work without JS. So this kind of concerns is useless now :)
Ionut Staicu
What if a visually impaired user wants to use your website?
Philip Morton
If you use names of months and four-digit years, it will be self-labelling, as there won't be any overlap between the sets of values.
Dave Sherohman
Downvoted: drop-downs are VERY annoying for users, especially for this kind of data. See Nielsen: http://www.useit.com/alertbox/20001112.html
Mauricio Scheffer
A: 

Why don't you test all three and pick the one that the performs the best? This seems like a good candidate for Google Website Optimizer to test.

It may be that the type of users you have, or the type of site you are running may dictate that your solution should be different than the "norm".

Nicolai
+2  A: 

I had tried datePicker with my user but it turn out to be a bad UI to them. What I end up base on their request is to have 3 textbox where they can quickly type [ day ] [ month ] [ year ] :(

c.sokun
+31  A: 
Patrick McElhaney
Upvoted: This is exactly the answer I was going to give. Datepicker is good for 'I know it's a Friday' kind of situations, but for date of birth it adds no value.
slim
Downvoted: drop-downs are VERY annoying for users, especially for this kind of data. See Nielsen: http://www.useit.com/alertbox/20001112.html
Mauricio Scheffer
Plus, with jQuery datepicker it's very easy to have a text input + optional datepicker (http://docs.jquery.com/UI/Datepicker)
Mauricio Scheffer
@mausch That's why I prefaced my answer with "If your goal is to make sure 'the user won't be confused at all'"FTA: "Drop-down menus do have their advantages... because they are a standard widget (even if an unpleasant one), users know how to deal with a drop-down menu when they encounter it."
Patrick McElhaney
@patrick, you're right, dropdowns are very standard, but a simple textbox is more natural IMHO as it is closer to what a paper form would look like. My point is that people have "10/9/1975" deeply hardwired into their brains from all the repetitions, so let them write just that.
Mauricio Scheffer
IMO the best date input UI is google calendar's
Mauricio Scheffer
So, were you born on October 9 or September 10? I don't how to resolve that ambiguity with a simple text box.
Patrick McElhaney
That is solved by the user's locale. Each culture (locale or country) has its own date formatting convention.
Mauricio Scheffer
@Patrick McElhaney: simple solution is to display recognized value to user as soon as possible. I do that when parsing FogBugz due time: http://www.foglyn.com/screenshots/thumb-editing-due-time.gif, it's nice help.
Peter Štibraný
+1  A: 

As perhaps one of the older people here, and born late in the month, I find drop-down menus for birthdates to be frustrating. I typically have to scroll down on two drop-down menus, and that's awkward. I'd much rather type it in.

If you can have a control designed so that it can either accept drop-down menus or be typed into, and make it clear both work, that would be excellent.

David Thornley
This isn't really an issue because most browsers, when the dropdown widget is focussed, support typing to get quickly to the correct value
thepeer
@thepeer: But they don't look like it. There's not what John Norman ("Design of Everyday Things") called an affordance for typing.
David Thornley
A: 

Who don't you use the jQuery UI DatePicker?

It's configurable to suit pretty much any needs. The only downside is if you're including it with jQuery UI it has a somewhat large footprint..

Update

Some of the file sizes appear to have changed, so they are updated below. Keep in mind these numbers will only be correct for the time they were last updated. Things may have changed since then.

  • CSS theme - 23kb
  • jQuery UI - 71kb minified
  • DatePicker - 38kb
  • Plus a couple of images (next month/previous month, which I'm pretty sure are sprited)

But that's not too bad...

alex
Don't worry, you can chop css pretty much. I wanted only to know what's the best method ;)
Ionut Staicu
68k....that is wrong, as is the 28k css theme...
redsquare
@redsquare things have probably changed since I posted this. Feel free to edit my answer. Thanks for letting me know too.
alex
for the datepicker only the total custom ui js is 38k minified, with gzip this is then considerably smaller
redsquare
A: 
Kip
No need to have the day be a drop down box. Entering and validating a number between 1 - 31 is trivial.
Alex Czarto
+1  A: 

As mentioned in the Jakob Nielsen article, drop down lists should be avoided for data that is well known to the user:

Menus of data well known to users, such as the month and year of their birth. Such information is often hardwired into users' fingers, and having to select such options from a menu breaks the standard paradigm for entering information and can even create more work for users.

The ideal solution is likely something like follows:

  • Provide 3 separate text boxes for day, month, and year (labeled appropriately)
  • Sort the text boxes according to the user's culture.
  • Day and Month text boxes should be sized so that a 2 digit input is assumed.
  • Year text box should be sized so that a 4 digit year is assumed.
  • Allow the user to enter a 2 or 4 digit year. Assume a 2 digit year is 1900, and update the textbox to reflect this onBlur (or on a following confirmation step).
  • Allow the user to enter either a month number OR month name.
Alex Czarto
+1  A: 

As other users have mentioned, one of the downsides of most datepickers is the difficulty in going back many years to select the year-of-birth, especially for older users. And the problem with a drop-down/select is that it often requires a lot of scrolling and/or scanning to find the right year. But the Any+Time(TM) Date Picker AJAX Calendar Widget provides an excellent alternative: to select a year in the past, simply press the "<" button, then a new dialog appears for the user to click the digits of their birth year. So, for example, to enter "1967", the user simply clicks <, 1, 9, 6, 7, X (dismiss)... this is so much faster than a typical datepicker, a drop-down/select, or even writing out the year by hand!

Andrew M. Andrews III
Ewww...........
Bennett McElwee
+1  A: 

Here's a review of options and opinions on each...along with a poll that shows what others think.... http://liveux.wordpress.com/2010/04/09/how-to-enter-a-birth-date%E2%80%A6let-me-count-the-ways/

Heidi
+1  A: 

Birthdates are different from other dates because people are often used to typing their specific birthdate.
A text box with an example is clear, quick and easy to enter:

 _______
|_______| (example: 31/3/1970)

This should support flexible formatting such as 1/1/1970 or 20/07/70.

If you have to support different cultures with different date conventions (e.g. US and UK) then this could be error-prone for people who don't heed the example. To avoid this you could use a
select list for month, and text boxes for date and year.

 _________   __   ____
|March  |V| |__| |____|

This removes ambiguity between day and month ordering, but is a little clunkier to use.

Bennett McElwee