After diving into Vue.js, I am now incorporating it into an existing project without the option of using .vue files. This is a standalone setup not utilizing webpack, which requires the files to be stored locally for functionality. In my current scenario, I have resorted to employing online .js files.
The specific datepicker library I aim to implement can be found here: https://github.com/mengxiong10/vue2-datepicker
However, I have encountered an issue where the datepicker fails to render as expected.
I am struggling with registering the component properly and have experimented with various methods without success. Any assistance from someone knowledgeable in this area would be greatly appreciated.
Thank you in advance for any help offered!
Here is a simplified code snippet illustrating my attempts:
<!DOCTYPE html>
<html>
<head>
<title>Vue test</title>
</head>
<body>
<script src="https://vuejs.org/js/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue2-datepicker"></script>
<div id="app">
<input type="text" v-model="Data.SomeText" />
<date-picker v-model="Data.SomeDate"></date-picker>
</div>
<script>
var vm = new Vue({
el: '#app',
data: { Data: '' },
components: {
'date-picker': DatePicker
},
created: function () {
this.Data = {"SomeText":"Hey","SomeDate":"2017-12-24T00:00:00"};
}
});
</script>
</body>
</html>