Editor - Mask unknown field type mask

Editor - Mask unknown field type mask

RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

Hello,

I'm using Trial Datatables Editor,

Can I use MaskInput on Trial Version ?

I'm added jQuery Mask Plugin js File

Error : angular.js:15536 Possibly unhandled rejection: Error adding field - unknown field type mask

{
data: "aylikucreti"
,name: "aylikucreti"
, title: "Ücret"
, className: 'dt-body-center'
,type: "mask"
,mask: "#.##0"
,maskOptions: {
reverse: true,
placeholder: ""
}
}

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited April 2019

    Hi @orka@orka.com.tr

    Yep, you get the full functionality in the trial version. It looks like you're adding the mask information into DataTable's columns declaration, rather than the Editor fields. Could you check and if it looks ok as is, could you post more code or link to a test case please.

    Cheers,

    Colin

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

    Hello colin,

    I created a Test page for you can see the error,

    personel.orkabulut.com/Public/Test

    Please continue to the first alert message with click ok

    Site.js = vm.Test()
    OrkaTools.js -> DataTable.Olustur()

    Thank you.

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    You need to include the Editor / Mask integration plug-in which isn't available during the trial I'm afraid. I'll drop you a PM just now though.

    Allan

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

    Hello Allan, Thank you.

    How I can do Mask as Turkish Lira

    1150.19 -> 1.150,19
    250.25 -> 250,25
    1251149.50 -> 1.251.149,50

    Decimal : ","
    Thousands: "."

    DataTables Rendering true, but Mask Edit worrong

    My Example :

    personel.orkabulut.com/Public/Test

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @orka@orka.com.tr ,

    Looking at their docs, , they have this for money, 000.000.000.000.000,00,

    Cheers,

    Colin

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0
    edited April 2019

    hi Colin,

    I'm tryed this Mask Format but Not correctly working.

    I'm changed my example with this mask

    personel.orkabulut.com/Public/Test

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Ah, I suspect you'll need the reverse property too, try:

        , mask:  "000.000.000.000.000,00"
        , maskOptions: { reverse: true }
    

    C

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

    Thanks Colin,

    I'm sorry to bother you, Okey now from Mask but worrong Changing Values,

    Im tried without render, result has not changed

    1.250,19(in mask) incorrect changing to 125019 (rendered value),

    personel.orkabulut.com/Public/Test

    and How i can do get changed values, ArrayList not changing

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @orka@orka.com.tr ,

    It looks like the columns.render is getting the value without the decimal place. Change the final bit of the render to be display(data/100) and it works as expected, see here.

    I'm not sure what you mean by ArrayList, but you can get the raw data with cell().data(), or the rendered value with cell().render(), passing in 'display',

    Cheers,

    Colin

This discussion has been closed.