Skip to content

[@nativescript/datetimepicker] ios display error #128

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

Closed
Upd4ting opened this issue May 6, 2021 · 5 comments · Fixed by #173
Closed

[@nativescript/datetimepicker] ios display error #128

Upd4ting opened this issue May 6, 2021 · 5 comments · Fixed by #173

Comments

@Upd4ting
Copy link

Upd4ting commented May 6, 2021

Hey there,

Since one week i'm having the timepicker displaying badly on my device. I have updated the plugin to the last version.

image

Any idea?

@NathanWalker
Copy link
Contributor

Is it possible you may have top level selector styling in your .css/.scss by chance? Those can affect dialogs.

@Upd4ting
Copy link
Author

Upd4ting commented Jun 8, 2021

That wouldn't affect only iOS then I think. I used an other system that I crafted to input time now so can't really test again.

@tommag21
Copy link
Contributor

I am having the same issue on an iPad, iOS 12.5.3. I notice @Upd4ting was testing on an iPad too, might it be related to the screen size?

Console logs:

Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x282f1da40 h=--& v=--& UIDatePicker:0x100b17970.midX == 368   (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x282f1d950 h=--& v=--& UIDatePicker:0x100b17970.width == 304   (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x282f194f0 h=--& v=--& UIView:0x100b3dcf0.width == 320   (active)>",
"<NSLayoutConstraint:0x282f0f930 UIDatePicker:0x100b17970.right <= UIView:0x10f14dda0.right + 16   (active)>",
"<NSLayoutConstraint:0x282f0ec10 UIView:0x10f14dda0.left == _UIAlertControllerView:0x102a7f000.left   (active)>",
"<NSLayoutConstraint:0x282f0c9b0 UIView:0x10f14dda0.right == _UIAlertControllerView:0x102a7f000.right   (active)>",
"<NSLayoutConstraint:0x282f0f750 UIView:0x100b3dcf0.width == _UIAlertControllerView:0x102a7f000.width   (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x282f0f930 UIDatePicker:0x100b17970.right <= UIView:0x10f14dda0.right + 16   (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x282f1da40 h=--& v=--& UIDatePicker:0x100b17970.midX == 368   (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x282f1d950 h=--& v=--& UIDatePicker:0x100b17970.width == 304   (active)>",
"<NSLayoutConstraint:0x282f0d220 H:|-(<=16)-[UIDatePicker:0x100b17970](LTR)   (active, names: '|':UIView:0x10f14dda0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x282f0d220 H:|-(<=16)-[UIDatePicker:0x100b17970](LTR)   (active, names: '|':UIView:0x10f14dda0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

@rob4226
Copy link
Contributor

rob4226 commented Sep 26, 2021

I have the same issue on iPads. The entire date picker is cut off, you can only see the very left edge of the month. 😢

  • The spinner type date picker iosPreferredDatePickerStyle="1" is cut off on iPads
  • The calendar type date picker on iPad is usable but is slightly cut off on the left and right sides.

Screen Shot 2021-09-26 at 1 50 47 PM

Screen Shot 2021-09-26 at 1 51 59 PM

rob4226 added a commit to rob4226/plugins that referenced this issue Sep 27, 2021
This commit fixes an issue with the datetimepicker plugin. On iOS
iPads the DatePicker was almost completly cut off in Spinner mode.
Only part of the month was visible so it was unusable. Also, in
Calendar mode, the left and right sides were partially clipped off.
This commit fixes those issues on iOS tablets.
Also, in the demo and demo-angular apps, added an example
to show spinner mode on iOS v14+ bc with 14+ the default is
the calendar mode so the examples only showed calendar mode
in iOS 14+.

Fixes NativeScript#128
rob4226 added a commit to rob4226/plugins that referenced this issue Sep 27, 2021
This commit fixes an issue with the datetimepicker plugin. On iOS iPads
the DatePicker was almost completly cut off in Spinner mode. Only part
of the month was visible so it was unusable. Also, in Calendar mode, the
left and right sides were partially clipped off. This commit fixes those
issues on iOS tablets.
Also, in the demo and demo-angular apps, added an example to show
spinner mode on iOS v14+ bc with 14+ the default is the calendar mode so
the examples only showed calendar mode in iOS 14+.

Fixes NativeScript#128
@rob4226
Copy link
Contributor

rob4226 commented Sep 27, 2021

Ok I fixed the iOS iPad issue for both the spinner mode, and calendar mode, with PR #173

Here are screenshots with the fixes:
fixed-spinner-Screen Shot 2021-09-27 at 2 38 53 AM

fixed calendar-Screen Shot 2021-09-27 at 2 39 14 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants