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

    0.17 Datetime Input incorrect date displayed?

    Help
    1
    3
    314
    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.
    • F
      FascistDonut last edited by FascistDonut

      For some reason, when I set the model programmatically (vs manually picking the date), the datetime input component displays the selected date as 1 day earlier, bur it has a value of the correctly selected date when I inspect it in vue dev tools. How can I get this to display the correct date (e.g. the assigned value of the model)?

      <q-datetime v-model=“from” type=“date” format=“YYYY-MM-DD” minimal/>

      f049d2a3-b99e-4637-891e-cf77aaa9c247-image.png

      f3d8ea88-22e8-4448-826a-3c3649b5d57b-image.png

      1 Reply Last reply Reply Quote 0
      • F
        FascistDonut last edited by FascistDonut

        I think it has something to do with using dashes vs slashes, but according to the documentation it should work if I provide a format.

        It also only happens on months that have a leading 0…

        http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html

        1 Reply Last reply Reply Quote 0
        • F
          FascistDonut last edited by FascistDonut

          I was able to hack this to work locally by changing the actualValue computed property in QDatetime.js to just return the value, since I know I am setting it correctly.

          //return formatDate(this.value, this.computedFormat, /* for reactiveness */ this.$q.i18n.date)
          return this.value

          However, now I don’t know how to keep that change in my netlify deployments. 😕

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