mymth / vanillajs-datepicker

A vanilla JavaScript remake of bootstrap-datepicker for Bulma and other CSS frameworks
MIT License
752 stars 155 forks source link

Bootstrap 5 support #37

Closed lofwyr14 closed 2 years ago

lofwyr14 commented 4 years ago

It would be nice to see a Bootstrap 5 (currently alpha) support. The first step for migration is:

brianzinn commented 3 years ago

Did you make any progress on that @lofwyr14? I think Bootstrap 5 stable comes out this month :)

Ended up here and with your color-yiq replacements but still many CSS classes missing:

<style lang="scss" scoped>
@import '../../node_modules/bootstrap/scss/_functions.scss';
@import '../../node_modules/bootstrap/scss/_variables.scss';
@import '../../node_modules/bootstrap/scss/_mixins.scss';
@import '../../node_modules/vanillajs-datepicker/sass/datepicker-bs4.scss';
</style>

Ended up just importing the bs4 css from the dist folder and it's usable...

micabal commented 3 years ago

Regarding the Error: $color1: color-yiq(#f8f9fa) is not a color.

As suggested by @brianzinn, it compiles fine with

@import "path/to/node_modules/vanillajs-datepicker/dist/css/datepicker-bs4";

pieecia commented 3 years ago

Regarding the Error: $color1: color-yiq(#f8f9fa) is not a color.

As suggested by @brianzinn, it compiles fine with

@import "path/to/node_modules/vanillajs-datepicker/dist/css/datepicker-bs4";

it doesn't, a mixin is undefined and the file won't be compiled if you use BS5

brianzinn commented 3 years ago

@pieecia things may have changed since March. The datepicker-bs5 is not on NPM, but it is in repo you directly add github. ie:

"vanillajs-datepicker": "github:mymth/vanillajs-datepicker#4843b2f8527e0dda08db9d12091796f0e570fce7",