0.0.8 • Published 3 years ago

react-native-timeslots-picker v0.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

React Native Time Slot Picker

npm version downloads MIT License

Simple TimeSlot Picker for React Native.

Requirements

  • React Native 0.60 or higher
  • Moment.js
  • NativeBase

Installation with NPM

npm install react-native-timeslots-picker --save

Installation with Yarn

yarn add react-native-timeslots-picker

Usage

import {TimeSlotPicker} from "react-native-timeslots-picker";

...

const [selectedTimeSlot, setSelectedTimeSlot] = useState(null);

return (
  <Box>
    <TimeSlotPicker
          slotResult={slot => {
            setSelectedTimeSlot(slot);
          }}
          timeSlotInterval={15}
          weekDayFromTime={'08:00'}
          weekDayToTime={'18:00'}
          weekendFromTime={'08:00'}
          weekendToTime={'12:00'}
        />
    <Text>Select Time Slot: {selectedTimeSlot}</Text>
  </Box>
)

Props

PropTypeDefaultDescription
slotResultfunctionnullCallback function to get selected time slot
weekDayFromTimestring'08:00'Weekday start time
weekDayToTimestring'18:00'Weekday end time
weekendFromTimestring'08:00'Weekend start time
weekendToTimestring'12:00'Weekend end time
timeSlotIntervalnumber15Slot interval in minutes
disableHeaderbooleanfalseDisable header shown

Screenshots

Screenshot

License

ISC

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago