1.0.21 • Published 2 years ago

@peritos-solutions/react-native-scheduler-component v1.0.21

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

Introduction

This scheduler component support Daily, Weekly, Monthly Schedul

Installing

To use just need to:

npm i @peritos-solutions/react-native-scheduler-component

OR

yarn add @peritos-solutions/react-native-scheduler-component

Example

import SchedulerComponent from "@peritos-solutions/react-native-scheduler-component";

const formData = {
  startDate: "DD MMM YYYY",
  fromTime: "hh:mm a",
  toTime: "hh:mm a",
  every: "",
  end: "",
  endDate: "DD MMM YYYY",
  endAfter: "10",
  selectedOnRadio: "onDay",
  on: "First",
  on0: "1",
  onDay: "Sunday",
  weekList: [
    { week: "S" },
    { week: "M" },
    { week: "T" },
    { week: "W" },
    { week: "T" },
    { week: "F" },
    { week: "S" },
  ],
};

<SchedulerComponent
  onPressModalClose={() => onPressPickerClose()}
  onPressPickerShow={(type) => onPressPickerShow(type)}
  modalVisible={true}
  onPressDateSave={() => onPressPickerShow()}
  onSelect={(type, value) => onChangeValue(type, value)}
  formData={formData}
  switchValue={{ value: true, type: "Daily" }} // you can use type Weekly, Daily
  onSwitchChange={(value, type) => onSwitchChange(value, type)}
  showSwitch={true}
  disableInputs={disableInputs}
  textColor={{ color: colors.textColor }}
  showSwitchItems={{
    daily: { status: true, text: "Every Day" },
    weekly: { status: true, text: "Weekly" },
    monthly: { status: true, text: "Monthly" },
    hourly: { status: true, text: "Every Hour" },
    oneTime: { status: true, text: "One Time" },
  }} // If you not add showSwitchItems it will showing all default item, if condition is false then particular item will be hidden
></SchedulerComponent>;

Props

PropDescriptionDefaultType
formData{ startValue: "DD MMM YYYY", fromValue: "hh:mm a", toValue: "hh:mm a", everyValue: "", endValue: "", endValue1: "DD MMM YYYY", weekList: { week: "S" }, { week: "M" }, { week: "T" }, { week: "W" }, { week: "T" }, { week: "F" }, { week: "S" }, ,}-object
modalVisibleenable or disable date picker modal etcfalseboolean
showSwitchenable or disable all day, week, month switchtrueboolean
showSwitchItemenable or disable all day, week, month switc { daily: true, weekly: true, monthly: true }object
switchValueSwitch value help to detect which switch is active{ value: true, type: "Daily" }object
1.0.19

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.10

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago