Skip to content

Conversation

Copy link

Copilot AI commented Jan 19, 2026

Moved defaultValue computation from server-side to client-side across all input types. Each input type now implements createDefaultValue() to parse and validate default values according to its value type.

Changes by input type

  • Checkbox: Parses 'checked' string to boolean
  • ComboBox, NoInputTypeFoundView, TextInputType: Validates string input, returns null for non-strings
  • NumberInputType (Double, Long): Validates numeric input, returns null for non-numbers
  • Date, Time: Pattern-matches ISO format; falls back to RelativeTimeParser for expressions like +1d, -2h, now
  • DateTimeRange, PrincipalSelector: Returns null (no default values supported)

Supporting changes

  • RelativeTimeParser: Added parseToDate() and parseToTime() methods to support date/time-specific relative expressions
  • DateHelper.isoValueToDate(): Added mode parameter to support date-only and time-only ISO formatting
  • DateTime, Instant: Removed server-side default value injection logic

Example usage:

// Date input with relative time expression
createDefaultValue('+7d')  // Returns value 7 days from now

// Number input with validation
createDefaultValue(42)     // Returns numeric value
createDefaultValue('foo')  // Returns null value

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix issue with computing defaultValue on client side Compute defaultValue on client-side #4234 Jan 19, 2026
Copilot stopped work on behalf of anatol-sialitski due to an error January 19, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants