Skip to content

Add clear button for date and date-time form editor drawer #4551

Description

@gabriel-bolbotina

Context: Currently there is no way to set a date/dateTime field to NULL once a value has been picked. Users need a Clear button inside the calendar drawer to reset the field.

Solution: Add a Clear button for date and date time form editors to set the value to NULL and collapse the drawer.

Implementation hints:

  • app/qml/form/editors/MMFormCalendarEditor.qml and app/qml/form/components/MMCalendarDrawer.qml is where the changes will be made.
  • Add a new signal to be fired when the clear button is tapped
  • There is a signal that already supports null via its second param in MMFormCalendarEditor: root.editorValueChanged( root._fieldValue, true ) // isNull = true
  • Also, you can take a look how the clear button works in MMFilterDateInput.qml lines 62-94 for filter date fields or the Clear button in Value Map/ Relation editor.

Acceptance criteria:

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions