Skip to content

Commit

Permalink
fix(date-picker): limit max year to 9999 by default (#3747)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSisb authored Jan 31, 2024
1 parent 3c3ec9b commit 8d042fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/four-bulldogs-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/date-picker": patch
"@twilio-paste/core": patch
---

[DatePicker] limit the max year to 9999 by default. This is overwritable.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type DatePickerProps = Omit<InputProps, "type" | "insertBefore" | "insert
};

const DatePicker = React.forwardRef<HTMLInputElement, DatePickerProps>(({ element = "DATEPICKER", ...props }, ref) => {
return <Input element={element} {...props} type="date" ref={ref} />;
return <Input element={element} max="9999-12-31" {...props} type="date" ref={ref} />;
});

DatePicker.displayName = "DatePicker";
Expand Down

0 comments on commit 8d042fe

Please sign in to comment.