Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S Search and Reporting - archived
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Development
  • Search and Reporting - archived
  • Issues
  • #84

Closed (moved)
(moved)
Open
Created Dec 07, 2021 by bgm@bgmOwner

SearchKit/Form: exposing a Date custom field has invalid year range

To reproduce on dmaster:

  1. Create a new Custom Field (ex: Lucky Day), type 'Date', searchable, by range.

image

Optionally you can update a contact, so that at least one has a Lucky Day, but it is not a requirement to reproduce the bug. For extra luck, I used 2021-08-13.

  1. Create a SearchKit that lists Contacts, and display the field

  2. Create a Form for that Search, and expose the Lucky Day field as a filter. Give the form an URL to view the page.

image

Then go view the form, and notice how the date filter only lets you select dates in 2021:

image

If you go back to the custom field configuration, and set a number of years in the "Dates may be up to" prior/after, then the filter works correctly. However, having these fields empty usually means that there are no restrictions (or they default to -20/+10 years).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking