nativescriptnativescript-vuenativescript-pluginnativescript-telerik-ui

DatePicker does not show on iOS?


I can not choose a date in iOS, is there any known problem with RadDataForm DatePicker?

Check it out it has some strange kind of opening. User can not understand where to click or how to turn back again.

https://youtu.be/kFCuNbd-1zU

It can display the date but I cannot change the date.

  1. Click on datepicker
  2. Jumps to bottom of the page below
  3. Scroll back to up
  4. Click on an empty area

When I click on the empty area I can see the calendar.

blank area

NOTE: I don't have problems with other Pickers, Stepper, or Switches. Just DatePicker does not work.


Solution

  • The iOS 14 date and time pickers implementations work not good at least for now. As a solution, I use the old "inline/wheel" style of date/time picker. You can do it this way:

    // your template
    <DatePicker (loaded)="onLoad($event)"></DatePicker>
    
    // your controller
    import { Device, isIOS } from '@nativescript/core';
    
    onLoad(args) {
      if (isIOS && Device.osVersion >= '14.0') {
        args.object.ios.preferredDatePickerStyle = 1;
      }
    }