Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
8373 Lượt xem

can we customize the type attribute of field using JS? 

<input type="range"

will have to extend AbstractField or anything else?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

for that, I have to extend and override InputField's _prepareInput method and set type as range

file: basic_fields.js

method : _prepareInput

we can add all HTML tag attributes like this

this.$input.attr({
     type: range, 
     // other attributes
});
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
4345
1
thg 6 23
3653
1
thg 5 23
2203
0
thg 5 24
2169
1
thg 1 19
5349