输入一天中的时间或持续时间最直观,最实用的方法是什么? [英] What is the most intuitive, usable way of entering a time of day or a duration?

查看:126
本文介绍了输入一天中的时间或持续时间最直观,最实用的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Silverlight中构建业务线应用程序,需要让用户编辑两个.NET TimeSpan值.一个是一天中的某个时间(相对于午夜),另一个是持续时间.目前,我正在使用两个TextBoxes,格式为hh:mm.这很简单,但是肯定可以改进.我观察到人们在使用该应用程序,尽管有些人可以很快进入时间,但其他人却很挣扎.

I'm building a line-of-business application in Silverlight and need to get the user to edit two .NET TimeSpan values. One is a time of day (relative to midnight) and the other is a duration. Currently I'm using two TextBoxes, formatted as hh:mm. This is pretty straightforward, but it could definitely be improved. I've observed people using the application and while some have no problem quickly entering times, other people struggle.

鉴于我正在Silverlight2中工作,您会认为什么是完美的自定义控件,可以轻松地可视化和编辑这两个TimeSpans?

Given that I'm working in Silverlight2, what would you see as the perfect custom control that easily let you visualize and edit these two TimeSpans?

为了使事情变得更困难,UI应该允许选择一天中的任何时间,精确到分钟,但要强调正常工作日内的时间(例如:8:00am-5:00 pm).有些用户实际上是指2:00 pm,因此往往会输入2:00(am).

To make things harder, the UI should allow any time of the day to be selected with accuracy down to the minute, but emphasize times within the normal working day (eg: 8:00am - 5:00pm). Some users tend to enter 2:00 (am) when they really mean 2:00pm.

在我的应用中,我倾向于将时间和持续时间调整为5分钟间隔.有点背景,这个应用程序类似于一个房间预订应用程序,人们可以指定他们想要的时间和时间.

In my app, I'm tending towards aligning the times and durations to 5 minute intervals. As a bit of background, this app is similar to a room booking app where people specify when and how long they want a room for.

推荐答案

在我的一个Web应用程序中,我使用了带有2个手柄的滑块.

In one of my web applications I used a slider with 2 handles.

示例:

|.........Y-----------------Y...|
         5AM               8PM

当然,我并不需要像您这样的高精度,但是我相信,如果滑块稍长一些,则5分钟的间隔是可以的.

Of course I didn't need as high precision as you do, but I believe that with slightly longer slider 5min intervals would be possible.

要强调正常工作日,可以在正常工作日为滑块的背景涂上不同的颜色.或让处理人员抓紧"以开始和结束正常工作日.

To emphasize normal workday, you could colour background of the slider in different colour for normal workday. Or make handlers "snap" to start and end of normal workday.

这篇关于输入一天中的时间或持续时间最直观,最实用的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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