Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to add year selection into Calendar QML type of QtQuick.Controls 1.4 ?
Qt 6.11 is out! See what's new in the release blog

How to add year selection into Calendar QML type of QtQuick.Controls 1.4 ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 559 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by
    #1

    I have seen that qt provide the calendar Component as below :

    aad74e4b-da8b-4efe-b074-8f34c15ae560-image.png

    But here I am facing to one challenge that how to select year ?

    I am using this calendar in application till now i think year selection is not needed. But i come into use case where by default date set to 1 JAN 1901.

    So Now if i have to select current date through this calendar then you can see that it will be tedious to click next so many times.

    So can any qt expert suggest the right solution like date picker of angular like where year selection also possible ?

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      Yash Raj Goel
      wrote on last edited by
      #2

      same issue

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bob64
        wrote on last edited by
        #3

        It is probably best to avoid the Calendar from Controls 1 as it is deprecated in in Qt 5 and no longer exists in Qt 6.

        You could construct your own calendar with whatever behaviour you want using the components DayOfWeekRow and MonthGrid. These are in Qt.labs.calendar in Qt 5 but are in QtQuick.Controls in Qt 6 so there is a good upgrade path.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved