project/medusa-foundation-audit
| 1 | import { Calendar } from "@medusajs/ui" |
| 2 | |
| 3 | function isUnavailable(date: Date) { |
| 4 | // Disable all Sundays |
| 5 | return date.getDay() === 0 |
| 6 | } |
| 7 | |
| 8 | export default function CalendarUnavailable() { |
| 9 | return ( |
| 10 | <div className="flex flex-col gap-2"> |
| 11 | <span className="txt-small text-ui-fg-muted"> |
| 12 | All Sundays are unavailable for selection. |
| 13 | </span> |
| 14 | <Calendar isDateUnavailable={isUnavailable} /> |
| 15 | </div> |
| 16 | ) |
| 17 | } |