Basic Usage

Using all the defaults.

  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • Su
import React, { useCallback, useState } from 'react';
import { Calendar } from '@natscale/react-calendar';
import '@natscale/react-calendar/dist/main.css';
export function Basic() {
const [value, setValue] = useState(new Date());
const onChange = useCallback(
(val) => {
setValue(val);
},
[setValue],
);
return <Calendar value={value} onChange={onChange} />;
}
Last updated