qdate range returns string sometimes
-
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. -
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? -
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. -
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 whenstart
andend
dates are the same.You could post a github issue.
-
-
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.
-
Yeah I read it. I don’t agree but it is what it is.