vue-datetime icon indicating copy to clipboard operation
vue-datetime copied to clipboard

Issue with selecting year

Open amirilidan78 opened this issue 4 years ago • 0 comments

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 !

amirilidan78 avatar Oct 14 '21 07:10 amirilidan78