GithubHelp home page GithubHelp logo

trendingtechnology / react-datepicker-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from y0c/react-datepicker

0.0 2.0 0.0 1.48 MB

React Datepicker & RangeDatePicker & TimePicker Component

Home Page: https://y0c.github.io/react-datepicker

License: MIT License

JavaScript 1.87% CSS 4.98% TypeScript 93.15%

react-datepicker-1's Introduction

drawing

React DatePicker

License: MIT npm version Build Status codecov Maintainability code style: prettier dependencies Status devDependencies Status Storybook NPM Download Join the chat at https://gitter.im/react-datepicker/community

Flexible, Reusable, Mobile friendly DatePicker Component

๐ŸŽฌ Intro

DatePicker

datepicker

RangeDatePicker

rangedatepicker

TimePicker

timepicker

Demo in Storybook

Edit React Datepicker

โœจ Major Component

  • RangeDatePicker
  • DatePicker
  • Standalone Calendar
  • TimePicker

The components that you can use are as follows: If you want to configure the DatePicker yourself, you can configure it any way you want through the Default Calendar component.

๐Ÿ”ง Built With

  • TypeScript
  • Sass
  • React

๐Ÿ“ฆ Dependency

Moment is a javascript library for Parse, validate, manipulate, and display dates and times. this component use moment library to globalize and control date. You can check the locale list through this link.

๐Ÿ“ฒ Installation

yarn add @y0c/react-datepicker
# or 
npm install --save @y0c/react-datepicker

๐Ÿ’ก Examples

Simple DatePicker

// import Calendar Component 
import React, { Component } from 'react';
import { DatePicker } from '@y0c/react-datepicker';
// import calendar style 
// You can customize style by copying asset folder.
import '@y0c/react-datepicker/assets/styles/calendar.scss';

// Please include the locale you want to use.
// and delivery props to calendar component 
// See locale list https://github.com/moment/moment/tree/develop/locale
import 'moment/locale/ko';

class DatePickerExample extends Component {

  onChange = (date) => {
    console.log(date);
  }
  
  render() {
    return (
      <DatePicker locale="ko" onChange={this.onChange}/>
    )
  }
}

You can find more Exmaples and Demo in story book link

๐ŸŽจ Themeing

  1. Copy this project asset folder under scss file
  2. Override scss variable you want(_variable.scss) ( red theme examples )
// red_theme.scss
$base-font-size: 12px;
$title-font-size: 1.3em;

// override scss variable
$primary-color-dark: #e64a19;
$primary-color: #ff5722;
$primary-color-light: #ffccbc;
$primary-color-text: #ffffff;
$accent-color: #ff5252;
$primary-text-color: #212121;
$secondary-text-color: #757575;
$divider-color: #e4e4e4;
$today-bg-color: #fff9c4;

// import mixin 
@import "../node_modules/@y0c/react-datepicker/assets/styles/_mixin.scss";
// import app scss
// if you want other style customize 
// app.scss copy & rewrite !
@import "../node_modules/@y0c/react-datepicker/assets/styles/app.scss";

if you want custom css rewrite app.scss file

Try this example!

Edit 1rw1lp8w7j

โš™๏ธ Local Development

This component is managed by a storybook which is combined with develop environment and documentation. If you want develop in local environment, clone project and develop through a storybook

# clone this project
git clone https://github.com/y0c/react-datepicker.git
# install dependency
yarn
# start storybook 
yarn run storybook

Open your browser and connect http://localhost:6006

๐Ÿ’ผ Get Support

Please fork and use https://codesandbox.io/s/pw6n17pk57 to reproduce your problem.

  • Open a new issue(Bug or Feature) on Github
  • Join the Gitter room to chat with other developers.

๐Ÿ“ License

MIT

react-datepicker-1's People

Contributors

gitter-badger avatar y0c avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.