Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calender Widget is not showing/visible with BS4 #40

Open
ayaanraj opened this issue Mar 20, 2018 · 6 comments
Open

Calender Widget is not showing/visible with BS4 #40

ayaanraj opened this issue Mar 20, 2018 · 6 comments

Comments

@ayaanraj
Copy link

I'm using Aurelia-skeleton-esnext and bootstrap v4.
And I have configured the plugin as below:
In main.js:


.plugin('aurelia-bootstrap-datetimepicker', config => {
      // extra attributes, with config.extra
      config.extra.iconBase = 'font-awesome';
      config.extra.withDateIcon = true;
      // or any picker options, with config.options
      config.options.showClear = true;
      
      // or any picker options, with config.options
      config.options.showTodayButton = true;
      
      // or any picker options, with config.options
      config.options.format = 'DD-MM-YYYY hh:mm';
      
      // or any picker options, with config.options
      config.options.allowInputToggle = true;

      // if you use Bootstrap 4 Beta 3
      config.extra.bootstrapVersion = 4;

      // you can also change the Bootstrap 4 button class, default is shown below
      config.extra.buttonClass = 'btn btn-outline-secondary';
    })

So, when I select or focus on input element the result is as shown in the below image

screenshot from 2018-03-20 20-23-58

@ghiscoding
Copy link
Owner

Can you look at the client-cli sample, it should be working and is of ESNext type.

@ayaanraj
Copy link
Author

HI @ghiscoding , thanks for your reply,
I have tried with same configurations which you have provide, I found out that, if I change

config.options.format = 'DD-MM-YYYY hh:mm';

to

config.options.format = 'DD-MM-YYYY';

it works fine and the result is as expected, but when I add time to the date this issue comes.

@ghiscoding
Copy link
Owner

Hmm the Bootstrap 4 CSS that is in there was just temporary until an official release for Bootstrap-Select to support Bootstrap 4. They currently have a beta version to try it out.

So it's probably related to the temp CSS that I have put in there to support BS4. You could try to find what is wrong with it. The temp file is here and I also had similar display issue at first.

@ayaanraj
Copy link
Author

ayaanraj commented Mar 21, 2018

Haa, as you told it is some issue with style, and I have found this https://github.com/wgbbiao/bootstrap4-datetimepicker repo, i thing you might be aware of this. What I did here is, i have changed this [email protected]/src/js/bootstrap-datetimepicker.js file with js file which is provided in the bootstrap4-datetimepicker/src/js/bootstrap-datetimepicker.js and did the same for [email protected]/src/sass/_bootstrap-datetimepicker.scss and [email protected]/src/sass/bootstrap-datetimepicker-build.scss with files provided in the repo. So it works fine, but thing is that, repo code is not compatible with aurelia, so please help me out in, how can i use that repo code with aurelia, or any alternative to use aurelia-bootstrap-datetimepicker with bootstrap@4

@ghiscoding
Copy link
Owner

Can you make a PR (Pull Request) with the necessary changes to apply to the styling BS4.

Or if you can't do a PR, then at least let me know of which code to change in that same styling BS4.

@ghiscoding
Copy link
Owner

ghiscoding commented Mar 24, 2018

I made a quick fix, it's not totally fix but it will get you going (see below).

I don't think I can fix the remaining issue without javascript changes to the core of the external library. The remaining issue, which isn't that big of deal, is that the date picker doesn't hide away after clicking on the time picker. I cannot switch to your recommended bootstrap4-datetimepicker since it will probably break people which still use Bootstrap 3 and I still want to support it for a while.

2018-03-24_15-28-38

@ghiscoding ghiscoding changed the title Calender Widget is not showing/visible Calender Widget is not showing/visible with BS4 May 17, 2018
Mobe91 pushed a commit to ordami/Aurelia-Bootstrap-Plugins that referenced this issue Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants