Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date utils: isSameDate() returns erroneous results in certain scenarios #1804

Closed
rstoenescu opened this issue Mar 19, 2018 · 0 comments
Closed
Milestone

Comments

@rstoenescu
Copy link
Member

Test-case:

<template>
    <q-datetime
      v-model="model"
      type="date"
      no-clear
      modal
      format="DD/MM/YY"
      min="Mon Feb 19 2018 00:00:00 GMT+0200 (EET)"
      :max="now"
    />
</template>

<script>
export default {
  data () {
    return {
      model: null,
      now: new Date(2018, 3, 20)
    }
  }
}
</script>

Steps to reproduce:

  1. Click on datetime component
  2. Click on day 1. --> view is messed up, looking as if showing february instead of march

Why?
Underlying code uses date utils isSameDate() which uses UTC time instead of local time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant