Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129693

Date-/time picker

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Quick: Controls 2
    • None

    Description

      We should have a date-/time picker control that application developers can just drop into their UIs.

      It should have the same look and feel as the platform as possible (if there is a standard control)

      There are several approaches to this.

      Proposal:

      Have a date(time) input that just displays the date. This would similar to how the HTML (see links below) date input is rendered. The application developer just instantiates e.g. one single DateTimeEdit control that have time/date properties that will change when the user alters it. Depending on the platform, the date can be altered by:

      1. Showing a popup with date (calendar) control where the user can choose the date
      2. User can directly write the date into the date input with keyboard
      3. Both

      This way, the pickers are just an implementation detail, so it will be easy to have different editors depending on style/platform.

      Editing the date should be possible with no extra glue/setup. We can also choose to expose the calendar/time pickers, and allow the developer to override how the editor is brought up.

      Should we investigate if it is possible (and beneficial) to use native date/time pickers?

       

      HTML: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_date

      Android: https://developer.android.com/reference/android/widget/TimePicker

      iOS: https://developer.apple.com/documentation/uikit/uidatepicker?language=objc

      Attachments

        1. macos-14-calendar-app.png
          macos-14-calendar-app.png
          145 kB
        2. windows-11-calendar-app-date-picker.png
          windows-11-calendar-app-date-picker.png
          14 kB
        3. windows-11-calendar-app-time-picker.png
          windows-11-calendar-app-time-picker.png
          12 kB
        4. android-material-3-date-pickers.png
          android-material-3-date-pickers.png
          59 kB
        5. android-material-3-time-pickers.png
          android-material-3-time-pickers.png
          66 kB
        6. windows-calendar-date-picker-2-views.png
          windows-calendar-date-picker-2-views.png
          13 kB
        7. windows-calendar-view-3-views.png
          windows-calendar-view-3-views.png
          51 kB
        8. windows-controls-datepicker-expand.gif
          windows-controls-datepicker-expand.gif
          58 kB
        9. windows-controls-timepicker-expand.gif
          windows-controls-timepicker-expand.gif
          50 kB
        10. ios-picker-compact-open@2x.png
          ios-picker-compact-open@2x.png
          223 kB
        11. ios-picker-inline-open@2x.png
          ios-picker-inline-open@2x.png
          126 kB
        12. ios-picker-wheels@2x.png
          ios-picker-wheels@2x.png
          64 kB
        13. apple-datepickertest.zip
          31 kB
        14. macos-datepicker-styles.png
          macos-datepicker-styles.png
          265 kB
        15. ios-datepicker-styles.mp4
          2.97 MB
        16. android-modal-date-input.png
          android-modal-date-input.png
          40 kB
        17. android-docked-date-picker.png
          android-docked-date-picker.png
          55 kB
        18. android-modal-date-picker-2.mp4
          2.23 MB
        19. android-modal-date-picker-1.mp4
          3.31 MB
        20. android-time-dial-picker.png
          android-time-dial-picker.png
          56 kB
        21. android-time-input-picker.png
          android-time-input-picker.png
          45 kB
        22. windows-datepicker-styles.png
          windows-datepicker-styles.png
          42 kB
        23. MainWindow.xaml
          3 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mitch_curtis Mitch Curtis
              smd Jan Arve
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes