<template>
  <div></div>
</template>

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

export default {
  name: 'ua-datetime-view',
  extends: UaDatetime,
  methods: {
    render () {
      this.$nextTick(() => {
        this.picker && this.picker.destroy()
        this.picker = new Picker(objectAssign(this.pickerOptions, {
          renderInline: true
        }))
        // #2797
        this.$nextTick(() => {
          this.picker.show()
        })
      })
    }
  }
}
</script>
