Fork me on GitHub

6 Mar 2011

Date and time inputs vs. usability

Form input controls for date/time values have always been problematic. The more I experiment with different options, the more I think there is no one-size-fits-all solution.

Calendar widgets

Calendar widgets such as the jQuery UI date picker or the Opera HTML5 date input are very popular and can be a slick looking addition to a form. I don’t think they’re entirely positive though and certainly don’t work in all situations. They’re great when you don’t know exactly the date you want (I want to book a flight around Easter time) or you need to have an overview of the calendar (I need to set a reminder for GGUG on the third Tuesday of every month). However, when trying to enter your date of birth the widget is just in the way. Even if the widget is keyboard accessible and doesn’t force you to page month-by-month to the correct year you can almost certainly type the date quicker than you can find and select it in a calendar widget.

Multi-field inputs

A multi-field input works well for entering familiar dates such as your date of birth or for transcribing data. They’re not so good when you need the context a calendar widget affords (please don’t force your users to mentally calculate what date the 3rd Tuesday of next month is).

With a multi-field input it’s vital to remember that users in different places will expect to enter dates in a different order. For example, here in the UK we use the completely logical dd mm yyyy order whilst an American will, bizarrely, want to put the month before the day. It’s not particularly difficult to build a tag that renders the fields in a different order according to the request locale. Using the HTML5 placeholder attribute (or a suitable fallback for older browsers) is invaluable to ensure that users know which field is which.

A possible optimisation is to auto-tab between fields after the user has typed the requisite number of digits. In that case you should allow for the user to correct mistakes, so backspacing or using the cursor keys should also automatically jump between fields otherwise the auto-tabbing behaviour becomes more a hinderance than a help for fat-fingered typists like me.

Selects in a multi-field input

It’s very common to use a select input for some or all portions of the date. Personally, I pretty much detest this practice as it combines all the inconvenience of a calendar widget with none of the contextual information. Grails’ <g:datePicker> tag does exactly this. Not only are select elements like this bulking out the page with huge option lists (Grails’ datePicker dumps 8.6Kb of markup in your page without time fields!) but they are cumbersome to input values into with the keyboard because so many values start with the same character. An arguable exception is a select for the month field as presenting textual values rather than numbers is a little friendlier and the option list is short enough and the values distinct enough to allow for reasonably quick keyboard selection.

I suspect the rationale for using select elements is often that it all but ensures the user can’t enter an invalid value (I’ve even seen significant hoop-jumping done in Javascript to ensure values such as 30th February can’t be entered). I think it’s preferable to give the user a clear input and trust them to do the right thing with it rather than forcing them to use an awkward input so that they can’t get it wrong.

Simple textual inputs

You shouldn’t rule out using just a basic text input. In fact for monotonous data entry purposes it is probably optimal. The keystrokes to enter a date become muscle memory and there’s no fiddling about tabbing between day, month and year fields or grabbing the mouse to pick options from a select element. Obviously the down-side is that a plain text input is error-prone and very liable to confuse users unless the expected format is made clear.

HTML5

HTML5 specifies various new date and time input types which seems like good news but has some significant drawbacks at the moment. I can only imagine the new input types are designed to be rendered as native browser widgets (currently only Opera actually does so) as the required format is just about the most inconvenient imaginable for text entry. Sure, as a developer it’s appealing to require that dates have to be entered as yyyy-mm-dd as you no longer have to support varied input formats but no user in the world would naturally type a date that way. Therefore, to make such inputs usable you really need to use Javascript to proxy them with a widget or a set of multi-field inputs. Fine, but what about users who disable Javascript or use mobile or assistive devices that might not cope particularly well with the widgets? The fallback - a text input into which the user must type a machine-readable RFC3339 date - is pretty unfriendly.

What’s worse is that Webkit based browsers such as Chrome and Safari will render the new input types as regular text inputs but refuse to submit a form containing incorrectly formatted values and unbelievably provide no user feedback whatsoever when they do so.

I’m inclined to think that the useful support for the new input types is so minimal and the actively user-hostile handling of them so much more widespread that they’re best avoided altogether.

So, to sum up:

  • Think about who your users are and what they are trying to accomplish with this particular input field and give them the right input for the job at hand.
  • If they need to type some or all of the value make sure it’s clear what format is expected or which field is which.
  • Allow for people to enter values in the order they are comfortable with and above all don’t force them to type it in a machine-readable format.
  • Don’t strand Chrome and Safari users with broken HTML5 input types.

71 comments:

Robert Elliot said...

What do you think about getting the best of both worlds by having a text input with a calendar widget? Then the user can choose the context of the widget or the speed of typing in the field.

Kevin said...

I have been struggling with this on the mobile side of things. I find neither date picker, iOS or Android, to be all that great.

iOS forces you to spin wheels to get to the date you want. Android has [+] [-] buttons but you can long press on a field and type in the value if you like.

They both fall way short when it comes to picking the 3rd Thursday of the month. I have a feeling I am going to write a calendar control allowing you to quickly pick a date. The apps I am working on are used by Doctors meaning they are generally picking a date in the new past or future so they will not be scrolling through months or years at a time.

That is something else to keep in mind. If the user will be entering birthdays you need fast year access, if they are setting appointments then access to dates around the current date should be fast.

I do like the idea of edit controls over a calendar display. Type if you want, click on a calendar if you don't. There are times I know the exact date and times when I want to pick next Tuesday.

Rob said...

A combination control can work, yeah. Being a bit of a progressive enhancement purist I'd want it to still be usable for someone with no Javascript which means I'd probably lean towards using a text/select/text or text/text/text alongside the calendar. The downside is it's a lot of fuss to input one value.

qinbincai123 said...

Though this be the last pain that she hike81ai makes me suffer,and these
the last verses that I write for her.
Wholesale New Era Hats
Cheap 59fifty Hats
Cheap New Era Hats
YMCMB Snapback Hats
Cheap Last Kings Snapback

Su Su said...

Thank you very much for your post, it makes us have more and more discs in our life, So kind for you, I also hope you will make more and more excellent post and let’s more and more talk, thank you very much, dear.
unblocked games| unblockedgames| unblocked games at school| unblocked games for kids
friv| friv4school| friv 4 school| monster high games| monster high| monster high drees up
happy wheels| happywheels| happy wheels demo| happy wheels unblocked| happy wheels hacked
shooting games| shooting| tetris| tetris unblocked| tetris game| tetris online

Chang bui thi said...

great post. i like it. feeling great when reading your post .
Signature:
friv4 , games girls , juego de frozen , kids games , friv , jogos de friv , juegos.com , juegos de matar zombbies
, unblocked games 77 , juegos de un show mas

Trần Lucy said...

Your article is very good, I have searched a lot of information in this article. I began to do a page, i hope it is soon completed. People can visit and comment, thanks.
girlsgogames l coolmath4kids l kizi l unblocked games l jogos de friv l jogos do friv l juegos de autos gratis l jogos do pou l juegos de los simpson l game for kids online l unblocked games

Ha Thu Tran said...

Thanks for sharing the information. It is very useful for my future. keep sharing
Games for girls|
Kizi 1|
Kizi 2

thị hậu nguyễn said...

I hope you will almost be posted such nice articles
happy wheels
super mario bros
pacman
agario

pubsquash John said...

Thanks for sharing the information. It is very useful for my future. keep sharing
Kizi 123|
Friv 234|
Friv

bibikafu said...

Thanks for your great article friend, i get new information, new ideas to do somethings, i hope you will share again, i keep waiting for next post, thanks.
Friv 4
Kizi 3

dieu anhmuon said...

you always bring everyone the most interesting and useful, I like it all, thank you.
Friv 10

XUKA said...

Thank you for sharing a great information and useful. it really necessary and timely for me at this time. I wanted to share this information with my friends on the social network facebook.!
Friv
Friv 10000

Online Game said...

You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
Thanks you for sharing!
Yepi
Kizi
Friv
Friv Games

Online Friv said...

you'd have time to look these kids active. Please visit our website and let us play the game interesting.
Thanks for sharing !
Friv 10
Kizi 10
Yepi 2

tranbaongoc said...

You are stressed and tired, you need entertainment. Refer to our website. hope you get the most comfortable.
Kizi 4

Online Friv said...

you'd have time to look these kids active. Please visit our website and let us play the game interesting.
Thanks for sharing !
Friv 10
Kizi 10
Yepi 2

Tahir Bahi said...

I agree with you.This post is truly inspiring.
I like your post and everything you share with us is current and very informative,
I want to bookmark the page so I can return here from you that you have done a fantastic job

T H A N K S
F O R
S H A R I N G

WinAVI Video Converter 11.5 Keygen
Trend Micro Antivirus
Movie Converter 7 Keygen
Neuratron Audio Score Ultimate Keygen

Le Bens said...

I would very much like to agree with the previous commenter! I find this blog really useful for my uni project. I hope to add more useful posts later.
Friv 100

Hieu Nguyen said...

You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
Thanks for sharing !
Friv 5
Kizi 1
Yepi 3

tranthuphuong said...

thank you for your interest in welcome visit
Friv 4

tranduyphong said...

New attractive game . I will play it every day
Friv|
Friv 2

Games Friv said...

When you're tired, you want to relax after a stressful working hours, you need to have time to take care of the kids active.
Please visit our website and play exciting flash games.Thanks you for sharing!
Friv 4

Ki Moon said...

This is something special! never seen this before! thank you.
Friv
Friv.com
Friv 2016

Games Friv said...

Play the Best Free Games! We've picked out the racing games, cooking games, candy crush, games shooting, fashion games, ...
Thanks for sharing !
Kizi 200
Friv 1
Y88
Y9

Lopez Alexander said...

Thanks for giving me the useful information. I think I need it!
Happy Wheels , FNAF World , Five Nights At Freddy's

Hieu Nguyen said...

You want to relax after a stressful working hours. Refer to our website. hope you get the most comfort.
Thanks for sharing !
Friv 100
Friv 8
Friv 2

Nguyen Vietvu said...
This comment has been removed by the author.
Nguyen Vietvu said...

Friv Games

Jenny Daring said...


Fireboy and Watergirl arrived again to the temple in the forest. 2 players together can help them to find their way out.
happy wheels | strike force heroes | tank trouble 2 | fireboy and watergirl |fireboyandwatergirl | fireboy and watergirl 2 | goodgame empire | slitherio | Tank trouble | happy wheels | Strike Force Heroes
Log in to your account or sign up to create a new account
gmail sign in | create a Gmail account

Online Friv said...

You want to relax after a stressful working hours. Refer to our website. Hope you get the most comfort.
Thanks for sharing !
GirlsGoGames
Kizi 100
Frvi

Online Friv said...

You need to have time to take care of the kids active. Please visit our website and play exciting flash games.
Thanks you for sharing!
Games2Girls
Kizi 1000
Frin
Friv 3

lee anh nuooi said...

visit our website to relieve stress
http://www.kizi100-games.com
http://www.games2wingirls.com
http://www.kizi5-games.com
http://www.friv-games.info/

eng -hassan aabd said...

شركة النور تقدم العديد من الخدمات لعملائها الكرام فنحن متخصصون في اعمال التنظيف ومكافحة الحشرات والنمل الابيض وكشف تسربات المياة وتسليك البيارات والمجاري اتصل بنا ليصلك مندوبنا اينما كنت فروعنا عديدة في جميع انحاء المملكة ,خبراء وفنيين في , احدث الاجهزة والمعدات ضمان علي جميع اعمالنا , اتصل الان 0507160513 خبرتنا ف اعمال التنظيف عالية تمتد لاكثر من عشرون عاما خبراء وفنيين في اعمال التنظيف ونستخدم افضل المواد والمعدات واحدث الاجهزة
شركة تنظيف فلل بالرياض
شركة تنظيف شقق بالرياض
شركة تنظيف بالرياض
شركة تنظيف منازل بالرياض
شركة تنظيف سجاد بالرياض
شركة تنظيف موكيت بالرياض
شركة تنظيف سجاد وموكيت بالدمام

Game Kizi said...

Thanks for sharing the information. It is very useful for my future. keep sharing. Can you play more games at: Friv 100 | Kizi4 | happy wheel

Alice Denny said...

The blog or and best that is extremely useful to keep I can share the ideas. Age Of War 2
Big Farm | Slitherio | Tank Trouble
Of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
Happy Wheels | Goodgeme Empire | Slither.io

Cute Soc said...

You go to our Web page you can play online games for free.
Our Web page selection is the biggest collection so you can play entirely for free
gun mayhem | can your pet
learn to fly | happy wheels game
tank trouble 3

Anika Kapoor said...

New Year Wishes 2017
Happy New Year 2017 Wishes
New Year Wishes for Friends 2017
New Year Wishes for Brother 2017
New Year Wishes for Best Friend
New Year Wishes for Lovers 2017

yoob games said...

Thanks for sharing the information. It is very useful for my future. keep sharing. Can you play more games at
al3ab-banat01
al3ab-banat01
al3ab-banat01
gamesbanatcoat

ngocanh said...

Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one.
temple run 2 l download temple run 2 l temple run 2 game l temple run 2 download l temple run 2 app

ngocanh said...

Nice! thank you so much! Thank you for sharing. Your blog posts are more interesting and impressive.
geometry dash apk l geometry dash game l geometry dash l download geometry dash l geometry dash app

ngocanh said...

I think there are many people like and visit it regularly, including me.I actually appreciate your own position and I will be sure to come back here.
launcher l download launcher l launcher apk l launcher app l launcherapp

tanya sweet said...


First of all i am saying that i like your post very much.I am really impressed by the way in which you presented the content and also the structure of the post. Hope you can gave us more posts like this and i really appreciate your hardwork.

Valentine Day Week List 2017
Happy New Year 2018 Images
valentine week date 2018
best whatsapp status ever
Good Night Pics
Happy Birthday Images
Happy New Year 2017 Images
Valentine Week List 2017

Tyler Hoechlin said...

Cheap Hosting

hường lê said...

Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

Discover our website bounty of free online games now!
Our website has the biggest collection of free online games. Totally new games are added every day!

age of war 2| gold Miner 2| unfair Mario 2 | cubefield 2 |tanki Online 2


Oanhtt said...

Thank you so much for commenting, it is lovely and really makes my day!
zoxy games |
friv 10 games | friv games | friv 100 play

Oanhtt said...

Thank you so much for commenting, it is lovely and really makes my day!
wheely 8 games | zoxy 3 | twizlgames | papalouie 4

Eric Trump said...

I’m glad you enjoyed it. Those are great habits! Thank you for sharing.
Friv 100

Ameesha Patel said...

New Year Quotes 2017
New Year Wishes 2017
New Year Greetings 2017
New Year Quotes for Sister
New Year Wishes for Father
Romantic New Year Wishes
New Year 2017 Wishes
New Year Wishes for Friends
New Year Wishes
Happy New Year 2017

Ameesha Patel said...

New Year Quotes 2017
New Year Wishes 2017
New Year Greetings 2017
New Year Quotes for Sister
New Year Wishes for Father
Romantic New Year Wishes
New Year 2017 Wishes
New Year Wishes for Friends
New Year Wishes
Happy New Year 2017

Game For Child said...

I very much agree with your comments. Your article is great. It helps me to know many things that previously I did not pay any attention to. Ask permission to share: twizl combines problem solving with spatial reasoning and logic. Can you solve all 33 challenging puzzles? advertisement. - zoxy games is the place to be for the best free online games. - y10 Free Online 2 players Games. Welcome to 2 Player Games Site the largest collection of the best and newest 2 player games.

Sana kapoor said...

Happy happy new year.Have a best and happy new year.
Celibrate with wishes to others eg friends, parents, brothers and relatives.
To bring close them with yourself.
Best New Year SMS 2017
New Year 2017 Wishes

Linh Nguyen said...

Play KIZI 100 Games game for free! Just click and start playing kizi100game online. Best of Kizi100 game series are waiting for you! Play all the top rated friv online, friv flash games today.

Suman Patel said...

republic day songs rose day sms Quotes about the New Year goodnight messages for her christmas images wallpaper merry christmas wishes business New Year Sayings and Quotes rose day sms

Suman Patel said...

funny australia day pictures new year wishes 2017 New Year Greetings Quotes New Year inspirational Messages chocolate day wishes happy hump day pictures merry christmas text christmas card design befikre review rating

Mai nguyễn said...

This is a great article. It gave me a lot of useful information. thank you very much.
Papa Louie 2

Run 3 | Stick Run 2 |friv4school | girls go games
unblocked games

lee anh nuooi said...

Work anybody but take some time to relax every day work efficiency will be higher than that. Invite you to visit our website

Friv 1
GirlsGoGames
Friv 4 School

Bảo Gia said...

I liked it so much and very interesting, too! Thanks for sharing the experience.
Wonderful post, really great tips and advice.
friv 3 games
friv 4 school
kizi 2

Yepi Games said...

I can’t help but fall in love with the place. Thank you so much for a wonderful post.

girlsgogames | moto x3m | Troll Face

jessica said...

These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.Website for school uk

Akshay said...

Useful quotes and messages thanks for sharing. nice looking site and great work.
happy chocolate day 2017
hug day 2017
kiss day quotes
promise day messages
teddy day messages
valentines day 2017 quotes
happy valentines day wishes
happy valentines day messages

Robert Niro said...

Great blog here with all of the valuable information you have. Keep up the good work you are doing here.

Easter Images
happy mothers day
father's day 2017
happy birthday Messages

Unknown said...

estados para whatsapp de amorestados para whatsapp
Frases para whatsappGracias por tu información

Unknown said...

estados para whatsapp de amorestados para whatsapp
Frases para whatsappGracias por tu información

akbar badshah said...

Valentine day Wishes
Valentine's day Wishes 2017
Valentine's day 2017
Valentine day Quotes
Valentine day Poem
Valentine day celebration with Girlfriend
Valentine's Week List 2017

Unknown said...

Thanks for sharing this good stuff! Keep up the great work, we look forward to reading more from you in the future!
Juegos Friv 4 | Kizi 1000

Askhay Patel said...

great post really appreciable work. That will be valuable to everyone who uses it, including myself.Thanks!
Easter Greetings
happy mothers day
http://www.fathersday-2014.net/
http://www.birthdaywishesquotes.org
wishesquotes.org/

Unknown said...

Thanks for your sharing! The information your share is very useful to me and many people are looking for them just like me! thank you! I hope you have many useful articles to share with everyone!
slither io

Mrinal pant said...

happy easter egg background
funny happy easter memes
happy easter bunny clipart
happy easter egg coloring pages

Arun Choudhary said...

easter quotes
easter wishes 
images of easter bunny 
easter egg hunt 

Linda Rose said...

I understand what you bring it very meaningful and useful, thanks.
Facebook Lite