mirror of https://github.com/acid-info/lsd.git
fix: fix disabled calendar days
Prevent clicking on disabled calendar days from changing the date.
This commit is contained in:
parent
2f6f391735
commit
82d4975cdc
|
@ -45,9 +45,9 @@ export const Day = ({ day, date, disabled = false }: DayProps) => {
|
|||
|
||||
return (
|
||||
<button
|
||||
onClick={onClick}
|
||||
onKeyDown={onKeyDown}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onClick={(e) => !disabled && onClick()}
|
||||
onKeyDown={(e) => !disabled && onKeyDown(e)}
|
||||
onMouseEnter={(e) => !disabled && onMouseEnter()}
|
||||
tabIndex={tabIndex}
|
||||
type="button"
|
||||
ref={dayRef}
|
||||
|
|
Loading…
Reference in New Issue