Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Issue with selecting year #269

Open
amirilidan78 opened this issue Oct 14, 2021 · 0 comments
Open

Issue with selecting year #269

amirilidan78 opened this issue Oct 14, 2021 · 0 comments

Comments

@amirilidan78
Copy link

amirilidan78 commented Oct 14, 2021

Hi i used vue-datetime to create my own component and used it in my website but recently i figure out one issue i dont know its libabry bug or i implemented wrong , im using version ^0.7.1
in my component

<template>
<DatePicker
      :placeholder="_placeholder"
      v-model="local_value"
      format="yyyy MMM dd"
      input-class="form-control form-control-solid cursor-pointer"
    >
</template>
<script>
export default {
props : {
    _label : {
      type : String ,
      default : "Label"
    },
    _placeholder : {
      type : String ,
      default : ""
    },
updateHook : {
      type : Function ,
      default : () => {}
    },
_default_value : {
      type : String ,
      default : ""
    },
} ,
  data(){
    return {
      local_value : "",
      error_message : "",
    }
  },
,
methods : {
updateVal( value ){
      this.updateHook(value);
      this.local_value = value ;
      this.validateValue()
    },
}

}
</script>

when i select day v-model trigger and updates value
but
when i change Year it v-model does`nt update local_value ,i should change year and then change day then it works !

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

No branches or pull requests

1 participant