New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ciqu-react-calendar

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ciqu-react-calendar

### Install

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-19.05%
Maintainers
1
Weekly downloads
 
Created
Source
React-Calendar

Install

npm install ciqu-react-calendar --save

Example


import React from 'react'
import ReactDom from 'react-dom'
import moment from 'moment'
import Calendar from 'ciqu-react-calendar'

class MyCalendar extends React.Component {

  constructor(props) {
    super(props)
  }

  onChange = (value: moment.Moment, inputValue: string) => {
    console.log(value.format('YYYY-MM-DD'))
    this.setState({value})
  }

  onOpenChange = (status?: boolean) => {
    console.log('open status: ' + status)
  }

  disabledDate = (currentDate: moment.Moment, inputValue: string) => {
    return false
  }

  render() {
    const {onChange, onOpenChange, disabledDate} = this
    return <div style={{
      width: 400,
      margin: '200px auto'
    }}>
      <Calender
        onChange={onChange}
        allowClear={true}
        disabled={false}
        placeholder={'please input date'}
        format={'YYYY-MM-DD'}
        defaultValue={moment()}
        onOpenChange={onOpenChange}
        disabledDate={disabledDate}
      />
    </div>
  }
}

ReactDom.render(
  <MyCalendar/>,
  document.getElementById('el')
)

API

interface CalendarProps {
  // when input value changes, this callback will be called, default null
  onChange?(value?: Moment, inputValue?: string): void
  
  // fired when date picker show or hide, default null
  onOpenChange?(status?: boolean): void
  
  // when returned true the date cannot be picked, default null
  disabledDate?(currentDate: Moment, inputValue: string): boolean
  
  // allow to clear the picked date, default true
  allowClear?: boolean
  
  // if true, the date picker is disabled, default false
  disabled?: boolean
  
  // control whether the date picker shows or hides, default false
  open?: boolean,
  
  placeholder?: string
  
  // moment format string, default 'YYYY-MM-DD'
  format?: string

  className?: string
  
  // value under control, default moment()
  value?: Moment
  
  defaultValue?: Moment
}

License

MIT

FAQs

Package last updated on 30 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc