ankurk91 / vue-bootstrap-datetimepicker

Vue.js component for eonasdan bootstrap datetimepicker
MIT License
223 stars 66 forks source link

Styiling issues with Laravel & Webpack #32

Closed smholsen closed 6 years ago

smholsen commented 6 years ago

I'm submitting a ... (check one with "x")

[ ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[X] Other, please describe

Hi! Thank you very much for hosting this repo. I am having some troubles trying to use the component however. image I see that the Glyphicons does not appear, but the functionality within the component works fine. Do you have any ideas on what might be wrong here? I am using this with Laravel and Vue, and importing these dependencies in the script part of the parent vue component.

 // Import required dependencies
import datePicker from 'vue-bootstrap-datetimepicker';
import 'bootstrap/dist/css/bootstrap.css';
import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css';

Sorry if this is not the correct place to post this.

smholsen commented 6 years ago

Solved the missing glyphicons by editing the configs to desired icons from fontawesome icons. The styling issues I am guessing might come from some of my own rules, I have not gotten to debuggind this yet. However there is still an issue when having time in to addition to the date. image

Clicking the click icon opens the time picker correctly, but attempting to click back does not swap the view back to the calendar. It does, however, swap the icon in-place. image

ankurk91 commented 6 years ago

You can check my webpack configs

https://github.com/ankurk91/vue-bootstrap-datetimepicker/blob/8344b915c67e7ee6233c47ad559701c314cf4802/webpack.config.dev.js#L49-L50

Are you using laravel mix, version? Laravel mix has already covered font icons loading.

smholsen commented 6 years ago

Thank you very much :) I will get back to debuggibg this later today, and will update the thread with my findings. I'll also check the version no. then.

smholsen commented 6 years ago

Yeah, so the issue was of course that I was using the newest version of bootstrap instead of using version 3 :) Changing to bootstrap 3 fixed the issue. Do you think you might make a Vue wrapper for a v4 version in the future? e.g. https://github.com/pingcheng/bootstrap4-datetimepicker or https://tempusdominus.github.io/bootstrap-4/

ankurk91 commented 6 years ago

@smholsen I will give it a try.

Meanwhile you may want to switch to - https://github.com/ankurk91/vue-flatpickr-component that does not require any css framework.

smholsen commented 6 years ago

Thank you very much :)

On Wed, Apr 25, 2018, 14:43 Ankur Kumar notifications@github.com wrote:

@smholsen https://github.com/smholsen I will give it a try.

Meanwhile you may wan to switch to - https://github.com/ankurk91/vue-flatpickr-component that does not require any css framework.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankurk91/vue-bootstrap-datetimepicker/issues/32#issuecomment-384272848, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpEApajCweNGCdgCWji1BZcLVCfleXPks5tsG9qgaJpZM4TiV6i .