Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 770 Bytes

File metadata and controls

10 lines (8 loc) · 770 Bytes

Date Range Validation (Within 30 Days) in Client Side

This ServiceNow client script provides real-time date validation for form fields, ensuring users can only select dates within a specific 30-day window from today's date. The script runs automatically when a user changes a date field value, providing immediate feedback and preventing invalid date submissions.

The script validates that any date entered in a form field meets these criteria: Minimum Date: Today's date (no past dates allowed) Maximum Date: 30 days from today's date Real-time Validation: Instant feedback as users type or select dates User-friendly Errors: Clear error messages explaining the valid date range Automatic Field Clearing: Invalid dates are automatically cleared to prevent submission