-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Datepicker header alignment #4443
Comments
Faced same issue setting: |
To add: I played with it and think it has something to do how angular creates the template code. When i copy the div to VS code and format the code en re-add it to the browser it works. |
I fixed it with: and adding preserveWhitespaces: true in tsconfig.json. Please add this to documentation. |
Hi @rjwijnen , Actually from my side, the title was aligned properly using angular 5.2.9 and angular-cli 1.5.0. I believe this is a issue related to angular 6 compatibility. |
@gyz0072004 as of Angular 6 they set preserveWhitespaces to false from default. That's why you need to enable it. I hope @valorkin can fix this, so we don't need to force preserveWhitespaces to true. |
…alse When used with `preserveWhitespaces: false` compilation option in Angular, the datepicker title elements are misaligned, because spaces are missing in the justified text. Since Angular 6, `preserveWhitespaces: false` is the default, so many users will encounter this bug. Let's add zero-width spaces in order to have a correct alignment in all cases. Closes valor-software#4443
I have created a fix at #4509. While waiting for review, you can apply the following patch to your repository: ngx-bootstrap-datepicker-issue-4443.patch |
…alse (#4509) * fix(datepicker): Fix navigation alignment with preserveWhitespaces: false When used with `preserveWhitespaces: false` compilation option in Angular, the datepicker title elements are misaligned, because spaces are missing in the justified text. Since Angular 6, `preserveWhitespaces: false` is the default, so many users will encounter this bug. Let's add zero-width spaces in order to have a correct alignment in all cases. Closes #4443 * fix(main): Reset `preserveWhitespaces` option to default This commit reverts fee535a and 0478637, which should not be needed anymore. `preserveWhitespaces: false` is the default since Angular 6: let's use the default!
Thanks for this! |
…alse (valor-software#4509) * fix(datepicker): Fix navigation alignment with preserveWhitespaces: false When used with `preserveWhitespaces: false` compilation option in Angular, the datepicker title elements are misaligned, because spaces are missing in the justified text. Since Angular 6, `preserveWhitespaces: false` is the default, so many users will encounter this bug. Let's add zero-width spaces in order to have a correct alignment in all cases. Closes valor-software#4443 * fix(main): Reset `preserveWhitespaces` option to default This commit reverts fee535a and 0478637, which should not be needed anymore. `preserveWhitespaces: false` is the default since Angular 6: let's use the default!
Bug description or feature request:
The part in bs-datepicker-navigation-view is not aligned properly. The arrows and date are not centered.
Plunker/StackBlitz that reproduces the issue: https://ngx-bootstrap-ykrrbh.stackblitz.io/
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 3.0.1
Angular: 6.0.5
Bootstrap: 3.3.7
Build system: Angular CLI, System.js, webpack, starter seed: Angular-cli 6.0.8
The text was updated successfully, but these errors were encountered: