0

I am new to vue js and I am trying to implement vuejs datepicker on version 1.0.27. As mentioned in the vuejs datepicker documentation. My app version is 1.0.27. I am trying to install npm install vuejs-datepicker@0.9.9 as mentioned in the vuejs datepicker documentation.

  • When installing with npm I tried placing the datepicker js file from the build folder inside node_modules and vue js from npmcdn. I got the error module is not defined. Since the datepicker js build starts as "module.exports"
  • I tried with plain js and bootstrap picker files as mentioned in the example I don't get the datepicker with 1.0.2 but with 2.x

Meanwhile I tried

  • Here, in the fiddle he provided,

But he seems to be using vue js 2.x version. also in the answer as well as question

I prefer to have a solution with vuejs datepicker@0.9.9 but atleast with some other datepicker with vuejs 1.0.27

Abel
  • 2,371
  • 3
  • 15
  • 29

1 Answers1

0

First you should add the import and then add Datepicker to the list of components:

<script>
import sweetalert from 'sweetalert';
import Datepicker from 'vuejs-datepicker'
import TodoList from './components/TodoList';
import CreateTodo from './components/CreateTodo';    

export default {
name: 'app',
components: {
TodoList,
CreateTodo,
Datepicker
},
</script>
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Istiake
  • 41
  • 1
  • 7