Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add limit client side

Steven Tey21c7370043a2
diff --git a/apps/web/ui/modals/add-edit-link-modal/expiration-section.tsx b/apps/web/ui/modals/add-edit-link-modal/expiration-section.tsx
index 894f0dbc2e..a74ba4636c 100644
--- a/apps/web/ui/modals/add-edit-link-modal/expiration-section.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/expiration-section.tsx
@@ -56,6 +56,9 @@ export default function ExpirationSection({
id="expiresAt"
name="expiresAt"
min={getDateTimeLocal()}
+ max={getDateTimeLocal(
+ new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
+ )}
value={expiresAt ? getDateTimeLocal(expiresAt) : ""}
step="60" // need to add step to prevent weird date bug (https://stackoverflow.com/q/19284193/10639526)
onChange={(e) => {