Error text "Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!"
What can I do to work?
Vue 2.0
The error seems pretty straightforward. Add a script tag with the bootstrap datepicker.
https://eonasdan.github.io/bootstrap-datetimepicker/Installing/#manual
Since this plugin is dependent on jquery and the plugin itself it checks if the jquery and datetimepicker are in the window object
if(window.$ && window.$.fn.datetimepicker)
Just make sure you have the plugin initialized according to it's docs. As long as you pass over that part it should work fine.
PS: If you don't want to depend on jquery you can have a look at this table https://icebob.gitbooks.io/vueformgenerator/content/fields/optional_fields.html and use the vanilla alternative or make a field yourself https://icebob.gitbooks.io/vueformgenerator/content/fields/custom_fields.html.
@cristijora thanks for your help.
Hm... Where i can add dependency? I use vue with laravel 5.4... but i understand your idea
problem number two now. Now, do not change the model to join a variety of dates. What could be the problem?
Please show your schema and version number of vue-form-generator.
{
type: "dateTimePicker",
label: "Start",
model: "Start",
required: true,
placeholder: "Start date",
},
{
type: "dateTimePicker",
label: "ExpirationTime",
model: "ExpirationTime",
required: true,
placeholder: "Expiration date",
},
"vue-form-generator": "^2.0.0-beta3",
See working fiddle. This field depends on moment, bootstrap and the plugin itself (see external resources on the left)
@Sinersis there was a refresh error in date fields (#118). They are fixed. Tomorrow I will make a new beta release with them.
Please test with beta4 release
Hello guys, I am trying to achieve this using main.js but getting above error
main.js
import Vue from 'vue'
import App from './App'
import Header from './Header'
import router from './router'
import VueFormGenerator from 'vue-form-generator'
import Bootstrap from 'bootstrap'
import BootstrapDatePicker from 'bootstrap-datepicker'
import Moment from 'moment'
import 'bootstrap/dist/css/bootstrap.css'
import 'vue-form-generator/dist/vfg.css'
import 'bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js'
import 'bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css'
Vue.config.productionTip = false
Vue.component('app-header', Header)
Vue.use({Bootstrap, VueFormGenerator, Moment, BootstrapDatePicker})
Vue.component('vue-form-generator', VueFormGenerator.component)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '
components: { App }
})
@bhupender005
Shouldn't BootstrapDatePicker be registered firt in your case before FormGenerator?
Vue.use({Bootstrap, Moment, BootstrapDatePicker, VueFormGenerator})
@cristijora Still getting same error
"Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!"
@bhupender005 I don't think you can use these non-vue modules with Vue.use. Check the dev example in dev folder how we can use them.
@icebob Says right. Indeed those modules are not Vue plugins so you can't use them like that. Only FormGenerator is. So dumb for not seing that 馃
@icebob Thanks for info
@cristijora I am too new to VueJS, my bad
Guys couldn't find dev folder, can you help me how to use "datepicker". Can you help me how to include these plugins/files in my current scenario (VueJS web-package)
@bhupender005 Sorry, but this is out of the scope of this plugin and the use of the issue tracker.
If you want to find help you can ask any question you like on the official Vuejs Forum or the Vuejs Gitter channel.
Of course, if you have an issue or question directly related to this plugin and it's use feel free to open another issue.
Good luck !
for Vue.js install:
npm install vue-bootstrap-datetimepicker
and import:
import datePicker from 'vue-bootstrap-datetimepicker';
import 'pc-bootstrap4-datetimepicker/build/css/bootstrap-datetimepicker.css';
@timoteo7 where did you place the Imports. I have tried alot so far and cant get anything to work.
Still stuck at.
Bootstrap datetimepicker library is missing. Please download
Most helpful comment
The error seems pretty straightforward. Add a script tag with the bootstrap datepicker.
https://eonasdan.github.io/bootstrap-datetimepicker/Installing/#manual
Since this plugin is dependent on jquery and the plugin itself it checks if the jquery and datetimepicker are in the window object
if(window.$ && window.$.fn.datetimepicker)Just make sure you have the plugin initialized according to it's docs. As long as you pass over that part it should work fine.
PS: If you don't want to depend on jquery you can have a look at this table https://icebob.gitbooks.io/vueformgenerator/content/fields/optional_fields.html and use the vanilla alternative or make a field yourself https://icebob.gitbooks.io/vueformgenerator/content/fields/custom_fields.html.