0.17 Datetime Input incorrect date displayed?



  • 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



  • 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



  • 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. 😕


Log in to reply