How to use the @material-ui/pickers.useStaticState function in @material-ui/pickers

To help you get started, we’ve selected a few @material-ui/pickers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mui-org / material-ui-pickers / docs / pages / guides / StaticComponents.example.jsx View on Github external
function StaticPickers() {
  const [value, handleDateChange] = useState(new Date());

  // you can past mostly all available props, like minDate, maxDate, autoOk and so on
  const { pickerProps, wrapperProps } = useStaticState({
    value,
    onChange: handleDateChange,
  });

  return (
    <>
      <div>
        
          
        

        <button>
          Clear date ({value &amp;&amp; value.toJSON()})
        </button>
      </div>

@material-ui/pickers

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

MIT
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis