Giter Club home page Giter Club logo

material-ui-pickers's Introduction

Material-UI pickers

npm package npm download codecov Bundle Size Build Status npm package

Accessible, customizable, delightful date & time pickers for @material-ui/core

Installation

Available as npm package.

npm i material-ui-pickers

Now choose the library that pickers will use to work with date. We are providing interfaces for moment, luxon and date-fns. If you are not using moment in the project (or dont have it in the bundle already) we suggest using date-fns or luxon, because they are much lighter and will be correctly tree-shaked from the bundle. Note, that we support only the 2.0.0-alpha.16 version of date-fns for now. Stay tuned!

npm i [email protected]
// or
npm i moment
// or
npm i luxon

Then teach pickers which library to use with MuiPickerUtilsProvider. This component takes a utils property, and makes it available down the React tree thanks to React context. It should preferably be used at the root of your component tree.

import MomentUtils from 'material-ui-pickers/moment-utils';
import DateFnsUtils from 'material-ui-pickers/date-fns-utils';
import LuxonUtils from 'material-ui-pickers/luxon-utils';
import { MuiPickersUtilsProvider } from 'material-ui-pickers';

function App() {
  return (
    <MuiPickersUtilsProvider utils={DateFnsUtils}>
      <Root />
    </MuiPickersUtilsProvider>
  );
}

render(<App />, document.querySelector('#app'));

And the last step of installation would be an icon font. By default, we are relying on material-icons font, but it's possible to override any icons with the help of corresponding props.

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

Documentation

Check out the documentation website

Recently updated?

Changelog available here

Contributing

For information about how to contribute, see the CONTRIBUTING file.

LICENSE

The project is licensed under the terms of MIT license

material-ui-pickers's People

Contributors

alex-fournier avatar alexander-morozov avatar alitaheri avatar baig avatar bguthriejr avatar brandonlee781 avatar cherniavskii avatar danieljuhl avatar dmtrkovalenko avatar garypwhite avatar hzraevets avatar jarib avatar johanneslamberts avatar josephmg avatar kahuna-celsius avatar lastdreamer avatar mairu avatar mcmickjuice avatar neutrix avatar olee avatar philipp91 avatar ponjimon avatar radicand avatar rosskevin avatar sakulstra avatar tfuqua avatar tjaskula avatar tkachenko-tatiana avatar trysound avatar tstaehli 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.