FormBuilder / Afform: Deleted options disappear when customizing options in a date field
Overview
In FormBuilder, when customizing the select options in a date field, the deleted options completely disappear.
Reproduction steps
Happening on my 5.67.3. I reproduced this on d10 demo site running 5.70.alpha1: https://d10-master.demo.civicrm.org/.
- Add a date field (such as Contact Created Date) as a filter on a search form.
- On the date field, click the Gear icon, then click Customize options.
- In the list of options, find "Today" and click the Trash icon to remove it from the list. It moves to the bottom of the list under a section "Delete options."
- Scroll to the top of the list and click the green Done button.
- Save the form. (optional)
- Now go to the Customize Options for that same date field, and search for the item "Today" which we deleted previously. It's gone. There is no list of "Deleted options" at the bottom.
Current behaviour
The "Deleted options" list disappears after saving the customized options for a date filter.
Expected behaviour
The list of "Deleted options" should always show if there are any options that have been removed.