-
Notifications
You must be signed in to change notification settings - Fork 162
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
Transparent background in popup #348
Comments
yes for me is too same error |
I updated from v9 to v16, so I don't know if this was working in v15. I would like to find where it broken |
in fact when all the angular dependencies were in version 16.1.0 it was working fine but angular was updated to version 16.2.0 and there it presented this error. |
I have also experienced the same issue after the upgrade. However something strange I've noticed is that if I click a "normal" mat-datepicker in the same application and subsequently click the ngx-mat-datetime-picker it will be styled correctly. If no normal datepicker pop-up has been previously shown it will be transparent. |
Maybe the issue comes from Material? I haven't got time to debug it deeply. But by what you say seems that the problem can come from upstream |
There are some updates on 16.2.1. |
I quickly tried it persists in 16.2.1 |
Faced the same problem. Does anybody have any workaround? It's a critical issue. |
As a workaround I've added some styles globally, not all of them but enough for what I need in the meantime. .mat-datepicker-content {
box-shadow: 0 2px 4px -1px #0003, 0 4px 5px #00000024, 0 1px 10px #0000001f;
background-color: #fff;
color: #000000de
}
.mat-calendar-body-selected {
background-color: #007f51;
color: #fff;
}
.mat-calendar-body-cell-content {
border: none !important;
} |
@h2qutc need your help) |
Thank you @cperezabo (gracias guacho) |
Is there any fix for this planned? |
Issue still exists. |
Please fix this issue. |
Strange thing I noticed: if you open a pure Angular datepicker & then open up this datetime picker all the styles are temporarily added back in again until you refresh the page. Not sure how useful this is but may help debug the problem. |
I was facing the same issue, I have fixed it by adding the missing CSS |
…' type Reason: h2qutc/angular-material-components#348 Signed-off-by: Pavel Shalamkov <[email protected]>
…' type Reason: h2qutc/angular-material-components#348 Signed-off-by: Pavel Shalamkov <[email protected]>
Still persists |
Any help on this. I have the same problem. |
I degraded the version from 16.2 to 16.1 and then to 16.0 still its not working. Did that work for anyone? |
yes i was also able to recreate that |
…' type Reason: h2qutc/angular-material-components#348 Signed-off-by: Pavel Shalamkov <[email protected]>
* Add WIP for generation dynamic forms * Add material design into form * Extend some features into material design * Add date time functionality into html component * WIP dynamic forms * Fix table generation * Fix some bugs and remove un used table functionality * ADD: main functionality of generating a form Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: minor layout inconsistencies Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: handle validation errors in templates Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: change ngx-mat-datetime-picker to an input of 'datetime-local' type Reason: h2qutc/angular-material-components#348 Signed-off-by: Pavel Shalamkov <[email protected]> * add readOnlyForm question to prompter * remove questions from form prompter * add disabled true if readOnlyForm is true * start refactoring prompter * remove choose complex props to hide from form * remove question from form prompter * add back question * fix table * FIX: inconsistencies with base data types of the form Signed-off-by: Pavel Shalamkov <[email protected]> * REFACTOR: generate form groups/controls as separate components Signed-off-by: Pavel Shalamkov <[email protected]> * REFACTOR: remove "readOnlyForm" option from "fieldConfig" Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: unnecessary imports while generating a form Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: parsing of control's value Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: incorrect naming of controls Signed-off-by: Pavel Shalamkov <[email protected]> * REFACTOR: optimize RootFormFieldStrategy Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: handling of dates Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: handling "readOnlyForm" Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: align form controls "disabled" state Signed-off-by: Pavel Shalamkov <[email protected]> * fix getting selected element * fix getExcludedProperties * ADD: handle date/time type fields Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: hide hints on disabled fields Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: incorrect target elements Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: missed copyright on "form" files Signed-off-by: Pavel Shalamkov <[email protected]> * do not show entities that are of type single entity * fix excluding properties for entity * allow for form generation to select collection aspect * FIX: compilation errors with generated components Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: stub for "list" type Signed-off-by: Pavel Shalamkov <[email protected]> * REMOVE: unnecessary options for form generation Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: handler for "structured value" type Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: example value to form fields Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: disable "submit" based on form availability Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: interface of a generated form Signed-off-by: Pavel Shalamkov <[email protected]> * REMOVE: unused code Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: show example values as placeholders for non-strict input types Signed-off-by: Pavel Shalamkov <[email protected]> * fix form generation * refactor prompter * refactor prompter * ADD: logic for "list" type Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: styles for groups of controls Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: exclude unnecessary generators for "form" Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: incorrect detection of the target FormFieldStrategy Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: support complex types in form fields of type "list" Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: handle "disabled" state and communication interface Signed-off-by: Pavel Shalamkov <[email protected]> * start documentation for form * update documentation * finish form documentation * add the environments files for form * UPDATE: "form" components selectors Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: split BaseFormFieldConfig interface Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: unhandled scalar types Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: handle import path for both versioned and non-versioned generation Signed-off-by: Pavel Shalamkov <[email protected]> * UPDATE: styles for "legend" tag Signed-off-by: Pavel Shalamkov <[email protected]> * FIX: incorrect import path for form types Signed-off-by: Pavel Shalamkov <[email protected]> * ADD: output overview to "form" README.md Signed-off-by: Pavel Shalamkov <[email protected]> * Fix overwrite problems for static files and run prettier * Fix unit tests * Prevent raise condition on request data, shpw error on data load error see #40 see #41 * Fix unit tests * FIX: linting errors Signed-off-by: Pavel Shalamkov <[email protected]> --------- Signed-off-by: Pavel Shalamkov <[email protected]> Co-authored-by: Pavel Shalamkov <[email protected]> Co-authored-by: Larisa Vasile <[email protected]> Co-authored-by: Anton Shabatin <[email protected]>
Could somebody provide a minimal reproducible example (MRE)? The issue isn't reproduced at the library site. So, having the MRE would be helpful |
@AlexElin please see the branch I made, you can observe the effect clearly there. |
Why this bug appears only now? It's been since Angular 11 and the deprecation of the |
Another repro: https://stackblitz.com/edit/angular-cpmuqe |
A simple workaround is to open and close a datepicker to load the styles. This isn't visible to the user. No need for global style hacks. //Workaround for https://github.com/h2qutc/angular-material-components/issues/348
@ViewChild('hiddenpicker')
private readonly hiddenpicker: MatDatepicker<null>
ngOnInit() {
this.hiddenpicker.open();
this.hiddenpicker.close();
} |
The issue does exist, and version 16.x doesn't function well with Angular Material versions >= 16.*. I also encounter styling collisions when using the native Angular Material datepicker alongside the datetimepicker on the same page. Considering that in version 16.x, the default start date is broken (#356), we addressed the issue as follows: Downgrade to latest version 9.* to maintain support for the default startdate.
Considering that people invest their free time in maintaining this package, it would be greatly appreciated if the mentioned issues could be resolved. The current state is starting to feel broken. |
still facing this issue |
@stnor I tried the open/close hack and it did not help. Even after manually opening an Angular Material date picker, the ngx-mat-datetime-picker is still missing styles. |
Overwrite the style ::ng-deep .time-container { ::ng-deep .mat-calendar-body-cell-content.mat-focus-indicator { |
Based on your workaround, it is also possible to directly use the mat- variables in order to support theming:
|
Amazing workaround for now! For me the chevron-up icons for the time selector are also missing. Is this related to this issue? The original issue has its chevrons. Anyone else experiencing that? |
@SeraphCoding Assuming my current understanding of the issue, this may be linked, as my feeling is that the issue could come from breaking changes regarding encapsulation in Angular latest versions. That said, the time picker buttons are not based on the same principle as the one upper right for the calendar (those last one use borders and 45° rotation). The time picker works with a traditional Assuming on the original capture, all dependencies are at the latest, there should be a way to make it work if the mat-icon module is properly imported and configured in your project / targetted module. |
Thank you for workaround. Just a tip for ones who has noticed issues with disabled labels style, in fact for some reason it seems the style for disabled days/years is still missing. Below an example: As you can see, only the chevrons disabled style is still present, so i added this class below as temporary workaround, hope it'll help you. .mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical) { color: var(--mat-datepicker-calendar-date-disabled-state-text-color); } |
For me the solution was:
Using a variable isn't needed as such; could just be |
The datetime picker includes a theming support file that was copied directly from Angular material, but in Angular material version 16.2, the implementation changed. This datetime picker package is still using the old version of the file, and it doesn't work with the token-based system of v16.2+. The only way the styling looks right is if the Angular material 16.2+ datepicker gets loaded first, in which case the |
@h2qutc I was going to try to update
If you are still maintaining this repo, let me know so I can try to help resolve this issue that so many users are running into. |
Thanks for the workaround fix along with previous contributors styles.. saved a lot of time !! I just added below as well to not show cursor pointer on disabled dates: |
This seems to be working in Angular 17. I haven't tested it a lot, just basically commented out the workaround code. |
This worket for me. Thankyou. |
Looks like this project is not maintained. I've found another library which contains material-like datetimepicker and many other useful components. |
This makes life a lot easier. Great mention! |
For anyone looking at v 17 I was missing the mixins in my custom theme file. you need them for each item and if missing were causing the backgrounds to be transparent and other issues : @use "@angular/material" as mat; $my-theme: mat.define-light-theme( @include mat.core(); |
Any update about fix for Angular 16? |
Hi, I updated Angular and Material to v16.2.0 and datetime-picker to v16.0.1
I don't know what changed, but I'm getting a transparent background now. Any idea?
Edit: In fact, confirmation button is missing, the popup won't close and there are no errors in console.
The text was updated successfully, but these errors were encountered: