(props)
| 114 | } |
| 115 | |
| 116 | function Cell(props) { |
| 117 | let ref = useRef<HTMLSpanElement | null>(null); |
| 118 | let {cellProps, buttonProps} = useCalendarCell(props, props.state, ref); |
| 119 | |
| 120 | let dateFormatter = useDateFormatter({ |
| 121 | day: 'numeric', |
| 122 | timeZone: props.state.timeZone, |
| 123 | calendar: props.date.calendar.identifier |
| 124 | }); |
| 125 | |
| 126 | return ( |
| 127 | <div {...cellProps} style={{display: 'inline-block'}}> |
| 128 | <span |
| 129 | ref={ref} |
| 130 | {...buttonProps} |
| 131 | style={{ |
| 132 | display: 'block', |
| 133 | width: 42, |
| 134 | height: 42, |
| 135 | background: props.state.isSelected(props.date) ? 'blue' : '' |
| 136 | }}> |
| 137 | {dateFormatter.format(props.date.toDate(props.state.timeZone))} |
| 138 | </span> |
| 139 | </div> |
| 140 | ); |
| 141 | } |
| 142 | |
| 143 | export function ExampleCustomFirstDay(props: AriaCalendarProps<DateValue>): JSX.Element { |
| 144 | let {locale} = useLocale(); |
nothing calls this directly
no test coverage detected