Docs
Required dates

Required dates

Require dates selection in a calendar.

When you set a calendar to required, the user must select at least one date and can't clear the selection.

For example:

January 2024
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
28293031123
import { Calendar } from '@bryanberger/datepicker';
import { ChevronLeft, ChevronRight } from 'lucide-react';
 
const MyDatePicker = () => {
 
	return (
		<Calendar
			required
		>
			{ /* ... */ }
		</Calendar>
	);
};
 
export default MyDatePicker;