vue-bulma / datepicker

Datepicker Component for Vue Bulma
MIT License
115 stars 56 forks source link

SSR not supported #41

Closed wilk closed 7 years ago

wilk commented 7 years ago

Missing support for Server Side Rendering: this is due to this issue https://github.com/vue-bulma/click-outside/issues/5 (vue-bulma-click-outside dep).

Following a workaround:

data() {
  return {
    datepickerVisible: false
  }
},
beforeMount() {
  this.$options.components.Datepicker = require('vue-bulma-datepicker')
  setTimeout(() => {this.datepickerVisible = true},0)
}

And then, inside the HTML template:

<p class="control" v-if="datepickerVisible">
  <datepicker :inputClass="{ test: true }" v-model="myDateModel"></datepicker>
</p>
luventa commented 7 years ago

Fix SSR error.