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

@viict/material-ui-pickers

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@viict/material-ui-pickers

React components, that implements material design pickers for material-ui v1

latest
Source
npmnpm
Version
2.0.3-tmp
Version published
Maintainers
1
Created
Source

Material-UI pickers

npm package npm download codecov Bundle Size Build Status

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 date-fns@2.0.0-alpha.21 @date-io/date-fns
// or
npm i moment @date-io/moment
// or
npm i luxon @date-io/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 '@date-io/moment';
import DateFnsUtils from '@date-io/date-fns';
import LuxonUtils from '@date-io/luxon';
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

Keywords

material-ui

FAQs

Package last updated on 22 Nov 2018

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