Skip to content

Issue with Data Type Handling: Decimal/Float Displayed as Date #75

Description

@maverik23

Package Version

v1.0.7

Laravel Version

v10.48.25

PHP Version

8.2.26

Problem description

When updating a value through the form, the plugin displays it as a date. However, in my model, the field is configured as a float, and in the database, it is set as decimal(15,2). While Spatie correctly stores the values, the plugin retrieves and displays them as a date instead of a float.

Let me know if additional details are needed to help resolve this issue. Thank you!

Captura de pantalla 2024-12-20 a la(s) 14 30 52 Captura de pantalla 2024-12-20 a la(s) 14 30 07

Expected behavior

The field should be displayed as a float or decimal value in the same format as it is stored in the database (decimal(15,2)), consistent with the configuration in the model (float). There should be no conversion or misinterpretation of the value as a date.

Steps to reproduce

  1. Configure a field in the model as float.
  2. Set the corresponding database column as decimal(15,2).
  3. Update the value of the field through the form.
  4. Observe how the field is displayed in the plugin; it appears as a date instead of a float/decimal.

Reproduction repository (issue will be closed if this is not valid)

none

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions