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

object data binding #253

Open
a-bayat opened this issue Feb 13, 2024 · 0 comments
Open

object data binding #253

a-bayat opened this issue Feb 13, 2024 · 0 comments

Comments

@a-bayat
Copy link

a-bayat commented Feb 13, 2024

I have something like bellow code

<template>
  <div>
    <persian-datetime-picker v-model="formdata.datetime"></persian-datetime-picker>
  </div>
</template>

<script>
import PersianDatetimePicker from 'vue-persian-datetime-picker';

export default {
  components: {
    PersianDatetimePicker,
  },
  data() {
    return {
      formdata: {
        datetime: '2024-02-12', 
      },
    };
    },
  },
};
</script>

the problem is if I use v-model="formdata.datetime" it would not work, but if i change formdata.datetime object to datetime and in data() change formdata: { dattime:'2024-02-12' to datetime:'2024-02-12' it will work! what is the problem with this way v-model="formdata.datetime"?

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