1.0.21 • Published 8 months ago

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

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months 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

10 months ago

1.0.21

8 months ago

1.0.20

9 months ago

1.0.18

11 months ago

1.0.17

12 months ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.10

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.0

2 years ago