What's the best approach to get Date/Time input from the user?

后端 未结 12 1364
感情败类
感情败类 2021-02-02 15:34

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

The Problem: The user needs to input a Date/Time

Basic considerations

12条回答
  •  清歌不尽
    2021-02-02 16:23

    I really like the way QT4's Date/Time widget works.

    • You can enter dates manually (type in the date, in common formats).
    • You can use your scroll wheel to quickly change date/time fields.
    • You have an expandable calendar that has drop down months and forward/backward arrows for the months. You can click on specific days and enter the year manually, or with a combo box (scroll wheel works here too).

    Here is a short video (~7.5MB) that shows how the widget works and what some of its features are: Video Here

    I would expect any sophisticated application to have some or all of these features.

    Being able to enter relative dates (today, last week, 3 days ago) is handy, but I'm not sure how practical it would be, given standard questions like "What is your date of birth?", or "When would you like X emailed to you?".

提交回复
热议问题