从用户那里获取日期/时间输入的最佳方法是什么? [英] What's the best approach to get Date/Time input from the user?

查看:88
本文介绍了从用户那里获取日期/时间输入的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,这是一次又一次地重新发明的车轮.

This is a wheel that's been re-invented again and again over the years.

问题:用户需要输入日期/时间

基本注意事项

  • 我们想让用户尽可能容易地输入所需的日期/时间
  • 某些应用程序要求提供历史日期,某些应用程序仅要求将来的日期,某些应用程序需要同时处理这两个日期
  • 我们要防止用户输入乱码
  • 我们希望尽可能主动地自动填充此控件.
  • 我们希望此控件尽可能地可重用.

受欢迎的解决方案包括:

Popular solutions include:

  • 文本框
  • 组合框
  • 弹出日历
  • 服务器端和/或客户端验证
  • 多种警告用户有关不良数据的方法

有很多现成的解决方案,但是我正在寻找一些更一般的信息.是否有关于各种日期时间控制方法的可用性研究?是否有最佳"日期时间控件?有什么行之有效的做与不做"吗?

There are a panoply of ready-to-eat solutions about, but I'm looking for some more general information. Have there been any usability studies done on the various date-time-control approaches? Is there a "best" date-time control out there? Are there any well-established "Dos and Don'ts"?

相关问题:描述时间的最佳GUI控件范围

推荐答案

给我一​​个日历,用鼠标选择日期.让我用键盘输入日期.接受尽可能多的格式.如果我需要输入2012年12月21日,请允许我使用:

Give me a calendar to select the date with a mouse. And let me type the date in with the keyboard. Accept as many formats as possible. If I need to enter December 21, 2012, let me use:

  • 2012年12月21日
  • 2012年12月21日
  • 2012年12月21日
  • 2012年12月21日(或2012年12月21日,选择一个,也许取决于我在哪个国家/地区使用该软件)
  • 12212012(与上面的括号相同)
  • 等等.

无论您决定采取什么措施来解决本地化问题,都要确保显而易见.给我一个例子,或一个可以键入的带有MMDDYYYY的模板.

Whatever you decide to do to solve the localization issue, make sure it's obvious what you expect. Give me an example, or a template with MMDDYYYY that I can type over.

请不要在需要滚动的地方给我下拉框,尤其是多年的滚动框.如果我年纪大了并且正在进入DOB,那么我一生中没有足够的时间向下滚动到下拉框的底部.当我不知道选项是什么时,下拉框是一个很好的模式,但是如果我非常熟悉该选项(例如我的生日),则下拉菜单会很麻烦.

Please don't give me pull-down boxes where I have to scroll, especially through years. If I'm old, and I'm entering my DOB, I don't have enough time left in my life to scroll down to the bottom of your pull-down box. Pull-down boxes are a good pattern to use when I don't know what the options are, but if it's something I'm very familiar with, like my birth date, then pull-down menus are a hassle.

现在,WRT时间输入(很大的烦恼),不要以为我是凌晨3点.如果我输入的时间是3,则假设我的意思是下午3点.让我做额外的工作来安排凌晨3点.如果您不愿意为我承担这么多的费用,请至少提醒我我计划在凌晨3点安排一些事情,这样我现在就可以解决问题,而不是稍后在我的活动邀请列表中的某人发送电子邮件时说:您该死,将我们的D& D聚会安排在凌晨3点!"

Now, WRT time inputs (Big pet peeve), don't assume that I meant 3 am. If I enter 3 for the time, assume I meant 3 pm. Make me do extra work to schedule something at 3 am. If you're uncomfortable with assuming that much on my behalf, at least alert me that I've scheduled something for 3 am so I can fix it now instead of later when someone on my event invitation list emails and says "You moron, you scheduled our D&D Meetup for 3 am!"

这篇关于从用户那里获取日期/时间输入的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆