jap115
503
5
Vue

Vuejs Bootstrap dateTimePicker

Posted 5 months ago by jap115

I'm using this:https://github.com/ankurk91/vue-bootstrap-datetimepicker?ref=madewithvuejs.com dateTime picker with Laravel 5.7 and VueJs 2.

I already had fontawsome installed using the guide on the website: https://fontawesome.com/how-to-use/on-the-web/using-with/vuejs

When I define the Icons when I'm using the

<date-picker v-model="date" :options="optionsDatePicker"></date-picker> 

in the settings like:

optionsDatepicker: {
                    format: 'DD-MM-YYYY HH:mm',

                    useCurrent: false,

                    icons: {

                        time: 'far fa-clock',

                        date: 'far fa-calendar',

                        up: 'fas fa-arrow-up',

                        down: 'fas fa-arrow-down',

                        previous: 'fas fa-chevron-left',

                        next: 'fas fa-chevron-right',

                        today: 'fas fa-calendar-check',

                        clear: 'far fa-trash-alt',

                        close: 'far fa-times-circle'

                    }
                }

I get an error: app.js:44761 Could not find one or more icon(s) {prefix: "fas", iconName: "times"} {}

I have installed all the icons needed in my app.js file.

import { faClock } from '@fortawesome/free-solid-svg-icons'
import { faCalendar } from '@fortawesome/free-solid-svg-icons'
import { faArrowUp } from '@fortawesome/free-solid-svg-icons'
import { faArrowDown } from '@fortawesome/free-solid-svg-icons'
import { faChevronLeft } from '@fortawesome/free-solid-svg-icons'
import { faChevronRight } from '@fortawesome/free-solid-svg-icons'
import { faCalendarCheck } from '@fortawesome/free-solid-svg-icons'
import { faTrashAlt } from '@fortawesome/free-solid-svg-icons'
import { faTimesCircle } from '@fortawesome/free-solid-svg-icons'

library.add(faClock)
library.add(faCalendar)
library.add(faArrowUp)
library.add(faArrowDown)
library.add(faChevronLeft)
library.add(faChevronRight)
library.add(faCalendarCheck)
library.add(faTrashAlt)
library.add(faTimesCircle)

But stil getting that error. I'm already using other icons for example:

<font-awesome-icon icon="pencil-alt"></font-awesome-icon>

which work fine.

I'm I missing somting?

Please sign in or create an account to participate in this conversation.