Masking double removes decimal point in back end

Masking double removes decimal point in back end

adam.owocyycadam.owocyyc Posts: 1Questions: 1Answers: 0

I am using https://editor.datatables.net/plug-ins/field-type/editor.mask to force a '$' character and numbers only in my field with an editor popup (MVC Core). It always returns **without **a decimal point even though the field is a double and the UI is showing a decimal point. I'm not sure is this an issue with datatables, or the jQueryMask plugin.

I have tried both of the following masks

                 {
                    label: "Tax:",
                    name: "taxAmount",
                    type: "mask",
                    mask: "$99999999999.00"
                },
                    {
                    label: "Total:",
                    name: "totalAmount",
                    type: "mask",
                    mask: "$#,##0.00",
                    maskOptions: {
                        reverse: true
                    }
        },

Answers

  • allanallan Posts: 54,680Questions: 1Answers: 8,552 Site admin

    Can you give me a link to your page showing the issue please? I'd like to see what data is being submitted to the server when creating / editing a row, and also what is being returned from the server.

    Thanks,
    Allan

  • jhegeduisjhegeduis Posts: 2Questions: 1Answers: 0
    edited September 20

    Was this ever resolved? I am having a similar issue.

    I am trying to save 1234.23 to the backend but it's sent as an integer. Here's the relevant part of the payload:

  • colincolin Posts: 12,600Questions: 0Answers: 2,154

    Our accounts aren't showing that you have an Editor license - it just reports that your organisation's trial expired several years ago. Is the license registered to another email address? Please can let us know so we can update our records and provide support.

    Thanks,

    Colin

Sign In or Register to comment.