New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@la-components/react-month-picker

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@la-components/react-month-picker

React month-picker Component

latest
Source
npmnpm
Version
1.0.17
Version published
Maintainers
4
Created
Source

React-Month-Picker-Component

Demo react-Month-Picker-demo

Basic Usage

import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { LaMonthPicker } from '@la-components/react-month-picker';
import '@la-components/react-month-picker/dist/style.css';

export default class App extends Component {
    constructor(props){
        super(props);
        this.state = {
            selectedYear: 2021,
            selectedMonth: 10,
            selectedFromDay: 1,
            selectedToDay: 31,
        };
    }

    onYearChange(year){
        this.setState({selectedYear: year});
    }

    onMonthChange(month){
        this.setState({selectedMonth: month});
    }

    onFromDayChange(fromDay){
        this.setState({selectedFromDay: fromDay});
    }

    onToDayChange(toDay){
        this.setState({selectedToDay: toDay});
    }

    render() {
        return (
            <div>
                <LaMonthPicker 
                    onYearChange={this.onYearChange}
                    onMonthChange={this.onMonthChange}
                    onFromDayChange={this.onFromDayChange}
                    onToDayChange={this.onToDayChange}
                    defaultDate="2021-10-01"
                    minDate="2018-10-01"
                    maxDate="2021-10-31"
                    labelMonthPicker="Tháng"
                    isShowDayRange={true}
                />
            </div>
        );
    }
}

ReactDOM.render(<App />, document.getElementById("app"));

Props

MonthPicker.propTypes = {
    onYearChange: PropTypes.func.isRequired,
    onMonthChange: PropTypes.func.isRequired,
    onFromDayChange: PropTypes.func.isRequired,
    onToDayChange: PropTypes.func.isRequired,
    defaultDate: PropTypes.string,
    minDate: PropTypes.string,
    maxDate: PropTypes.string,
    labelMonthPicker: PropTypes.string,
    isShowDayRange: PropTypes.bool
}

Keywords

react-month-picker

FAQs

Package last updated on 31 Oct 2023

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