datepicker-jalali-react

1.1.0 • Public • Published

datepicker-jalali-react

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save datepicker-jalali-react

Demo

https://matinrezakhani.github.io/datepicker-jalali-react/

Date Picker Jalali

props type default
value timestamp | Date | Moment Date
locale string ('fa','en') fa
disableDate boolean default is false
disableTime boolean default is false
onChange function this function will be called when the date or time changed

Usage

import React, { useState } from 'react'
import Datepicker from 'datepicker-jalali-react'

const App = () => {
  const [date, setDate] = useState('')

  const handleDatepicker = (e) => {
    console.log(e)
    setDate(e)
  }

  return (
    <div>

      <Datepicker
        value={date}
        onChange={(e) => {
          handleDatepicker(e)
        }}
      /> 

      <Datepicker
        value={date}
        disableTime
        onChange={(e) => {
          handleDatepicker(e)
        }}
      />
      
      <Datepicker
        value={date}
        disableDate
        onChange={(e) => {
          handleDatepicker(e)
        }}
      />

    </div>
  )
}

License

MIT © matinrezakhani

Readme

Keywords

none

Package Sidebar

Install

npm i datepicker-jalali-react

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

28 kB

Total Files

7

Last publish

Collaborators

  • matinrezakhani