mat-datetimepicker icon indicating copy to clipboard operation
mat-datetimepicker copied to clipboard

Deprecated property - underlineRef (starting position of datetimepicker goes haywire)

Open carbonrider opened this issue 7 years ago • 4 comments

I am using Angular 6.X. I noticed that when I use mat-form-field with an outline as appearance (check below), the datetimepicker popup opens at the very left top corner of the browser.

After going through the datetimepicker code, I realized that it uses underlineRef property to determine position. The property has been deprecated in Angular 6 (https://v6.material.angular.io/components/form-field/api)

carbonrider avatar Nov 07 '18 11:11 carbonrider

I can confirm that using Angular 7.x, Material 7.x and

<mat-form-field appearance="outline">
          <mat-datetimepicker></mat-datetimepicker>
</mat-form-field

breaks the application:

zone.js:192 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined
    at FlexibleConnectedPositionStrategy.push../node_modules/@angular/cdk/esm5/overlay.es5.js.FlexibleConnectedPositionStrategy.apply (overlay.es5.js:1692)
    at ConnectedPositionStrategy.push../node_modules/@angular/cdk/esm5/overlay.es5.js.ConnectedPositionStrategy.apply (overlay.es5.js:3012)
    at OverlayRef.push../node_modules/@angular/cdk/esm5/overlay.es5.js.OverlayRef.updatePosition (overlay.es5.js:1198)
    at SafeSubscriber._next (overlay.es5.js:1018)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:196)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:134)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:77)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)
    at TakeSubscriber.push../node_modules/rxjs/_esm5/internal/operators/take.js.TakeSubscriber._next (take.js:40)
    at TakeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)

jakobsanne avatar Nov 15 '18 14:11 jakobsanne

I have also faced this issue. this issue will be resolved with the next release? If yes, then any approx time of next release?

brijeshborad avatar Feb 01 '19 07:02 brijeshborad

Im also facing same issue

knvpk avatar Sep 05 '19 04:09 knvpk

Fixed by this? https://github.com/kuhnroyal/mat-datetimepicker/commit/59c5ab84432538f26c9990f29bc757d5049bcfbf

intellix avatar Oct 11 '19 16:10 intellix