How can i define my UI "counter"

i want to define my UI “counter” use the code below.

dhx.protoUI({name:"my_counter",defaults:{height:100,max: 5}}, dhx.ui.counter);

but it show wrong position.

You need to apply styling of default counter (dhx_el_counter className):

dhx.protoUI({name:"my_counter", defaults:{height:100,max: 5, css: "dhx_el_counter"}}, dhx.ui.counter);

use the default css is correct.but use my custom css is not work.

var countType={ css:"cart_counter ", min:0, max:10, width:120, height:28, earlyInit:true }; dhx.protoUI({ name:"my_counter", defaults:countType }, dhx.ui.counter); { view:"my_counter", id:"cnt_Auto", //css:"cart_counter "// put here is not work too. }

If you want to reserve some of counter styling, you should set “dhx_el_counter” classname for the container of you counter (please see my previous answer). In the other case, you will need to set all necessary styles for the new view.