No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    qdate range returns string sometimes

    Framework
    2
    7
    557
    Loading More Posts
    • 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.
    • C
      cherry314159 last edited by

      I’m using q-date range and it works fine if the from and to are different.
      However, if I select the start date and then click again for the final to date,
      it returns a string instead of an object. Is this a bug?
      If not it should be clearly documented.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @cherry314159 last edited by

        @cherry314159

        https://quasar.dev/vue-components/date#Example--Single-Range

        If I click on the a (start) date and then on any other date(end), the result looks fine to me.
        Could you explain more what you think does not work correctly?

        1 Reply Last reply Reply Quote 0
        • C
          cherry314159 last edited by

          The problem comes when the range is a single day. That is same date is selected for both start and end.
          In that case it returns a string instead of an object.

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @cherry314159 last edited by dobbel

            @cherry314159

            You’re right. I would also not expect a different result\behaviour for a single day range. Also I see that the number of days are not displayed when start and end dates are the same.

            You could post a github issue.

            1 Reply Last reply Reply Quote 0
            • C
              cherry314159 last edited by

              https://github.com/quasarframework/quasar/issues/8037

              1 Reply Last reply Reply Quote 0
              • C
                cherry314159 last edited by

                ok, the resolution is that it works as intended. The documentation needs to be clarified that it returns a string in cases where the beginning and end are the same date.

                dobbel 1 Reply Last reply Reply Quote 0
                • dobbel
                  dobbel @cherry314159 last edited by

                  @cherry314159

                  Yeah I read it. I don’t agree but it is what it is.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post