1.1.0 • Published 8 months ago

react-native-scrollable-time-date-picker v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

react-native-scrollable-time-date-picker

An extension to react-native-scrollable-time-date-picker A scrollable date or time picker where you can set max date & time.

It's developer for personal usage, but if you can use it feel free.

The library is using https://github.com/rheng001/react-native-wheel-scrollview-picker(https://github.com/rheng001/react-native-wheel-scrollview-picker) as dependency.

Installation

yarn add react-native-scrollable-time-date-picker

Usage

import Picker from 'react-native-scrollable-time-date-picker';

export default function App() {
  const onConfirm = (date: string) => {
    console.log('from index', date);
  };

  return (
    <View>
      <Picker
        type={'time'}
        confirmText={'Confirm'}
        cancelText={'Deny'}
        maxTime={'13:13'}
        value={'13:13'}
        open={false}
        onConfirm={(text) => onConfirm(text)}
        image={require('../assets/time_gray.png')}
      />
      <Picker
        type={'date'}
        confirmText={'Confirm'}
        cancelText={'Deny'}
        maxDate={'19-09-2023'}
        value={'18-09-2022'}
        open={false}
        onConfirm={(text) => onConfirm(text)}
        image={require('../assets/date_gray.png')}
        language="da"
      />
    </View>
  );
}
OptionValueRequiredDefault
onConfirm(date: string) => void;yes
type'date' or 'time'no'date'
backgroundColorstringno'white'
highlightColorstringno'red'
itemTextColorstringno'grey'
textColorstringno'black'
confirmTextstringno'Confirm'
cancelTextstringno'Cancel'
minDatestring 'DD-MM-YYYY'no
minTimestring 'HH:mm'no
maxDatestring 'DD-MM-YYYY'no
maxTimestring 'HH:mm'no
openbooleannofalse
valuestring 'DD-MM-YYYY' or 'HH:mm'yes
buttonStyleStylePropno
buttonTextStyleStylePropno
imageImageSourcePropTypeno
imageSizenumberno25
language:'da'/'de'/ 'en'/ 'fi'/'sv'/'no'no'en'

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

1.1.0

8 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.1.0

9 months ago