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 (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={onClick}
|
onClick={(e) => !disabled && onClick()}
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={(e) => !disabled && onKeyDown(e)}
|
||||||
onMouseEnter={onMouseEnter}
|
onMouseEnter={(e) => !disabled && onMouseEnter()}
|
||||||
tabIndex={tabIndex}
|
tabIndex={tabIndex}
|
||||||
type="button"
|
type="button"
|
||||||
ref={dayRef}
|
ref={dayRef}
|
||||||
|
|
Loading…
Reference in New Issue