Run the following command to install this package.
npm install react-mjho-picker
The most basic use of the Pickers can be described with:
import React, { useState } from "react";
import { DatePicker, TimePicker, ColorPicker } from "react-mjho-picker";
const Example = () => {
const [date, setDate] = useState(new Date());
const [time, setTime] = useState(new Date());
const [color, setColor] = useState('#ff0000');
return (
<DatePicker value={date} onChange={date => setDate(date)} />
<TimePicker value={time} onChange={time => setTime(time)} />
<ColorPicker value={coloe} onChange={color => setColor(color)} />
);
};
See more package information. link
Online Demo is here!