<template>

</template>

<script>
import Datetime from '../datetime'
import Picker from '../datetime/datetimepicker'
import objectAssign from 'object-assign'

export default {
  name: 'upaas-datetime-view',
  extends: Datetime,

  methods: {
    render () {
      const self = this;
      this.$nextTick(() => {
        this.picker && this.picker.destroy()
        this.picker = new Picker(objectAssign(this.pickerOptions, {
          renderInline: true,
          buttonPositon:'bottom',
          onHide(val){
            //console.log("执行了！！！");
            self.$emit('on-hide', val);
            return false;
          }
        }))
        this.picker.show()
      })
    }
  }
}
</script>
<style>

</style>
