Editor - Hot to Get ClassName Working
Editor - Hot to Get ClassName Working
For a n Editor "fields" option I can only get the "class" working. Using the "className" property does nothing.
How can I get this working. This is for IE 11.
var editor = new $.fn.dataTable.Editor({
...
{
"label" : "Avail Start",
"name": "TSSRAvail.AvailStart",
// Does not work: "className": "requiredEdit"
"attr": { "class" : "requiredEdit" }
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you putting
classNamein theattrlist? If so, then the behaviour you are seeing is correct - there is notclassNameattribute in HTML (if you use the browser's inspect you would probably see that it has been added to the element, but it won't have any effect since, as I say, HTML doesn't use aclassNameattribute.If you are using
classNamein the field object (fields.className) then the class will be getting added to the field container.Allan
Thanks. I now see that using "fields.className"` adds that class to the field container. I was looking at the input element.