1.1.1 • Published 2 years ago

react-jalali-scheduling-picker v1.1.1

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

react-jalali-scheduling-picker

jalali scheduling picker for react js

NPM JavaScript Style Guide

Install

npm install --save react-jalali-scheduling-picker
yarn add react-jalali-scheduling-picker

Usage

import React,{useState} from "react";
import SchedulingPicker from "react-jalali-scheduling-picker";
import  'react-jalali-scheduling-picker/dist/index.css';
function App() {
  const [show,setShow] = useState(true)
  return (
    <div className="App">
      <SchedulingPicker show={show}
                        setShow={setShow}
                        onChange={(v)=> {
                          console.log(v)
                        }}
                        exceptDays={[3,4,5]}
                        visitMinutes={15}
                        holidays={[13]}
                        exceptTimes={[{hour:8,minute:20}]}
                        startTime={{hour:9,minute:30}}
                        endTime={{hour:16,minute:30}}
                        onChangeMonth={(month)=>{
                          console.log(month)
                        }}
                        exceptFromDate={'1400/10/06'}
                        exceptToDate={'1400/10/01'}
                        justSelectDate={true}
      />
    </div>
  );
}

export default App;

Props

  • show : boolean

    show modal state

  • setShow : function

    set show state for close modal in component

  • startTime : object {hour:?,minute:?}

    start time in select time section

  • endTime : object {hour:?,minute:?}

    end time in select time section

  • visitMinutes : int

    The interval between times in select time section

  • holidays : array

    holidays in month

  • exceptDay : array

    days that are not allowed to choose

  • exceptTime : array

    times that are not allowed to choose

  • redHelp : text

    help text for holiday

  • grayHelp : text

    help text for excepted days

  • greenHelp : text

    help text for today

  • onChange : function (v)

    selected date and time

    v type is moment-jalaali

  • onChangeMonth : function (month)

    when month change in date picker section (for change holiday props)

    month type is integer

  • exceptFromDate : string days before input string date will be deactivated For example, '1400/10/07'

  • exceptToDate : string days before input string date will be deactivated For example, '1400/10/07'

  • justSelectDate : boolean just date select modal will be displayed

License

MIT © amirGhotb

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago