Skip to content

[FEAT]: Add optional date & time information button similar to weather/location APIs #584

Description

@vharkins1

📝 Description

Add an optional date & time information button to form fields, similar to the existing weather and location API buttons. When enabled, this control would let end users quickly insert the current date and/or time (or pick a date/time) into a field, and could optionally attach timezone information.

💡 Rationale

Many forms require date or timestamp input for the time of filling out the form. Providing a dedicated, optional button consistent with the weather/location integrations improves UX by making date/time entry faster and more accurate, reduces user error, and keeps patterns consistent across FireForm features.

🛠️ Proposed Solution

  • Add an optional UI control (button/icon) that can be configured on date/time fields in the schema or field props.
  • Support behaviors: insert current date, insert current date+time, open a lightweight date/time picker, and optionally include timezone.
  • Expose configuration options in the schema: { "dateTimeButton": { "enabled": true, "mode": "now|picker|both", "includeTimezone": true } }
  • Implement logic in src/components/fields/DateTimeField (or equivalent) to render the button and handle insertion.
  • Add tests and docs demonstrating usage and config examples.

✅ Acceptance Criteria

  • A configurable date/time button can be enabled for date/time fields.
  • Button supports inserting current date and/or time and optionally opening a picker.
  • JSON schema config and docs updated with examples.
  • Unit/integration tests cover the new behavior.

📌 Additional Context

  • Follow the same interaction and styling patterns used by the weather and location API buttons for consistency.
  • Consider accessibility (keyboard access, ARIA labels) and locale formatting for dates/times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions