DataTables Editor and Masked Input
DataTables Editor and Masked Input
willian.antunes
Posts: 4Questions: 1Answers: 0
Hello!
I tried to use the related plug-in but it seems that is not working. They are some examples below:
{
label: "Example 1:",
name: "distance",
maskOptions : {
"mask": "0"
}
And another one:
{
label: "Example 1:",
name: "distance",
mask: "0"
}
My debug: http://debug.datatables.net/ixabip
I had already tested the plug-in and it is working properly in any form input.
Am I missing something?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you talking about http://editor.datatables.net/plug-ins/field-type/editor.mask ? With a mask of '0' all that means it will allow any one number. What are you trying to show?
@aaronw, it's not working. I tried a lot of configurations without success. For now my solution is verifying in server-side what the user submits, but would be good to make this plug-in works.
"it's not working" isn't particularly helpful. Are you really just interested in trying to do a pre-submit check on the editor form? http://editor.datatables.net/examples/api/clientValidation.html would also be another way to do it using http://editor.datatables.net/reference/api/val%28%29
@aaronw, I now both of your suggestions. I'll save a bunch of time if I use masked input as you can see here, thus I prefer to make it work properly instead of reinvent the wheel.
Did you add type: mask as shown on lines 7, 12, and 18 of http://editor.datatables.net/plug-ins/field-type/editor.mask? Did you add the editor plug-in js (http://editor.datatables.net/plug-ins/download?q=field-type/editor.mask.js) in addition to the jquery.mask.js itself? Are there any JS errors? I need a little more than 'doesn't work'
@aaronw, if you see my debug in my question you can get some answers for your doubts. I believe the only thing missing here is the editor.mask.js. I thought my grace period would release it but a license is required. Thank you for your support.