Skip to content

Confirm Button is missing in DateTimePicker spinner using iOS newer versions #3027

@JSantangelo-Octopus

Description

@JSantangelo-Octopus

Description

In iOS, using v 16.0.3 and 17.4.1, confirm icon in DateTimePicker is missing. Its only fails in production, i cant reproduce the error using ExpoGo

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

  1. Implements a DateTimePicker

  2. Deploy the app on AppStore

  3. Open the DateTimePicker. The confirm button doesnt exists. This error make impossible to complete the form

Expected behavior

Have the cancel and confirm Buttons in the DateTimePicker component, using spinner display in any iOS version

Actual behavior

When using iOS v 16.0.3 and 17.4.1, the confirm button is missing and the DateTimePicker cannot be confirmed

More Info

Code snippet

import React, {useEffect} from 'react';
import {StyleSheet} from 'react-native';
import {View, DateTimePicker, Colors} from 'react-native-ui-lib';
import dayjs from 'dayjs';

const DatePicker = ({editable = true, ...props}) => {
  useEffect(() => {
    if (props.setInitialDate) {
      props.onChange(new Date());
    }
  }, []);
  let BG_COLOR = Colors.foreground;
  let BORDER_COLOR = Colors.themeSecondary;
  let inputColor = {
    backgroundColor: BG_COLOR,
    borderColor: BORDER_COLOR,
  };

  if (!editable) {
    inputColor.backgroundColor = Colors.disabled;
  }

  return (
    <View>
      <DateTimePicker
        style={{...fieldStyle, ...inputColor}}
        enableErrors={false}
        hideUnderline
        color={Colors.textInputPrimary}
        dateTimeFormatter={val => dayjs(val).format('DD-MM-YY')}
        editable={editable}
        placeholderTextColor={Colors.primary}
        height={45}
        headerStyle={containerStyle}
        {...props}
      />
    </View>
  );
};

const {fieldStyle, containerStyle} = StyleSheet.create({
  fieldStyle: {
    borderWidth: 2,
    borderRadius: 8,
    padding: 8,
    paddingLeft: 16,
  },
  containerStyle: {
    color: Colors.$textDefault,
    backgroundColor: Colors.foreground,
  },
});

export default DatePicker;


Screenshots/Video

(tested in ExpoGo first, and real app later)

WhatsApp.Video.2024-04-09.at.11.27.10.AM.mp4

Environment

  • React Native version: 0.73.6
  • React Native UI Lib version: 7.17.0
  • Expo version : 50.0.15

Affected platforms

  • Android
  • iOS
  • Web

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in one of the componentswontfix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions