14 Answers, 1 is accepted
I confirm that this is a bug and I am glad to inform you that the bug is fixed. The fix will be included with the next official release of Kendo UI.
Regards,Hristo Germanov
the Telerik team
Do you happen to know the syntax to MVVM bind that tooltip format property by any chance?
You can set the tooltip format via data attributes:
<
input
id
=
"slider"
data-role
=
"slider"
data-tooltip
=
'{ "format": "{0:c}" }'
/>
Hristo Germanov
the Telerik team
It's a range slider I should say, but this: data-tooltip='{ "format": "test {0} {1}" }
Is still putting the labels on the ticket marks, and the tooltip result is
"test 0 test 4" (assuming 0 is the min and 4 is the max). What I would want is it to be in the format specified "test 0 4"
This is by design (because of the labels format/tooltip). If you have {0:C} format each value will be formatted one by one(for example: tooltip value "$0.00 - $20.00"), but if you what to remove "-" you need to use template in your tooltip. Can you try this: data-tooltip='{ "template": "test #= selectionStart # #= selectionEnd #" }'.
Greetings,Hristo Germanov
the Telerik team
However the values are not updating...
data-tooltip=
'{ "template": "test #= Min # #= Max #" }'
//or
data-tooltip=
'{ "template": "test #= get("Min") # #= get("Max") #" }'
I see "test 0 10" but the 10 isnt changing as I move the slider
I can't understand what values are not updated? What are Min and Max? Can you send me a simple test project which reproduces the depicted issue?
All the best,Hristo Germanov
the Telerik team
Video: http://screencast.com/t/gAgvqWGyuUB
(So first is with the format set, the next is without format set)
I wasn't sure what selectionStart\End were...assumed that was the dataItem to bind to so I changed it. When they are there it throws script errors saying it cant find it.
I was able to examine your screencast and I think that this behavior is expected. The values that you show in the tooltip are not updated(the slider hasn't triggered change).
The major idea for selectionStart/End of the RangeSlider and value for the Slider are to show you the current value in the tooltip. When you do mouse up the slider will trigger change event(and it will update the value in your mvvm view model too). You can examine the slider events here.
All the best,Hristo Germanov
the Telerik team
So you're pretty much saying we're not able to define where both numbers showup in the tooltip format then right...cant do "between {0} and {1}" as a tooltip.
"...but that's not how the tooltip is supposed to work. Who wants a static tooltip when you drag things around, the idea is to show the user what number they're on, not what the previous value was :/ " Yes, you are right. This is the reason to implement "selectionStart/End" and "value" (those fields represents the current values and you can use them in the tooltip template). I notice that we haven't documentation for the slider's tooltip template and I will fix this problem.
"So you're pretty much saying we're not able to define where both numbers showup in the tooltip format then right...cant do "between {0} and {1}" as a tooltip." Unfortunately, you can't do it with the format, because of the ticks value/tooltip(as i mention in one of my previous replies). But you can achieve this functionality with template:
data-tooltip = '{ "template": "between #= selectionStart # and #= selectionEnd #" }'
Hristo Germanov
the Telerik team
data-tooltip =
'{ "template": "between #= Capacity[0] # and #= Capacity[1] #" }'
Again it's just static text that contains the previous values...I assume this is because I changed to an array over two seperate min\max values?
Can you examine this jsFiddle example and tell me if you don't understand something.
All the best,Hristo Germanov
the Telerik team