mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 13:33:57 +00:00
28 lines
670 B
Vue
28 lines
670 B
Vue
<template>
|
|
<input class="form-control">
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
value: {
|
|
required: false
|
|
}
|
|
},
|
|
mounted(){
|
|
let vm = this;
|
|
$(this.$el).datepicker({
|
|
format: 'dd-mm-yyyy',
|
|
autoclose: true,
|
|
clearBtn: true,
|
|
}).val(this.value).trigger("change").on('changeDate', function(){
|
|
vm.$emit('input', this.value);
|
|
});
|
|
},
|
|
watch: {
|
|
value: function(value){
|
|
$(this.$el).val(value).trigger('change');
|
|
}
|
|
}
|
|
}
|
|
</script> |