web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
642 stars 166 forks source link

Date Range Modal issue on android. #211

Closed premdasvm closed 1 year ago

premdasvm commented 1 year ago

Hi,

I've a date ranger picker inside a bottom sheet, it works perfectly fine on IOS, but on android it's only opening one also, when the date confirm button is pressed, my bottom sheet is getting close also, I need the bottom sheet to stay open.

Also I'm getting many warnings on my logs, I did register language on my index.js.

Please check the videos I attached, I need the android to works just like IOS version.

            <DatePickerModal
              locale="en"
              mode="range"
              visible={open}
              onDismiss={onDismiss}
              startDate={range.startDate}
              endDate={range.endDate}
              onConfirm={onConfirm}
            />
/**
 * @format
 */

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

import {registerTranslation} from 'react-native-paper-dates';
registerTranslation('pl', {
  save: 'Save',
  selectSingle: 'Select date',
  selectMultiple: 'Select dates',
  selectRange: 'Select period',
  notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
  mustBeHigherThan: date => `Must be later then ${date}`,
  mustBeLowerThan: date => `Must be earlier then ${date}`,
  mustBeBetween: (startDate, endDate) =>
    `Must be between ${startDate} - ${endDate}`,
  dateIsDisabled: 'Day is not allowed',
  previous: 'Previous',
  next: 'Next',
  typeInDate: 'Type in date',
  pickDateFromCalendar: 'Pick date from calendar',
  close: 'Close',
});

AppRegistry.registerComponent(appName, () => App);

https://user-images.githubusercontent.com/14838550/198884123-541cabcc-ea95-491b-a2d0-85a6e080c3ea.mov

https://user-images.githubusercontent.com/14838550/198884131-ad417af5-84db-458f-ad16-d487dbf4bd37.mov

RichardLindhout commented 1 year ago

You should locale="en" change to locale="pl"

RichardLindhout commented 1 year ago

I don't know why the bottom sheet is closed, plesae provide more code, I don't think it's an issue in this library to be honest

RichardLindhout commented 1 year ago

Please add reproducible snack so we could fix this, currently it takes too much work to reproduce issues like this