3

I'm trying to initialize a kendo-slider but I want to load it without a preselected value.

Currently, I initialize the slider by adding an extra step at the beginning (minValue - 1), so the drag handle starts at this position (label: '-').

Is there a better idea without having to add an extra value at the beginning?

const thisSlider = $elem.kendoSlider({
  increaseButtonTitle: 'Up',
  decreaseButtonTitle: 'Down',
  min: minValue - 1, // Add an extra step at the beginning
  max: maxValue,
  smallStep: 1,
  largeStep: 1,
  value: null,
})

// Change the label to '-'
thisSlider.siblings('.k-slider-items').find('.k-first').find('.k-label').html('-')
Vl4dimyr
  • 876
  • 9
  • 27
kapantzak
  • 11,610
  • 4
  • 39
  • 61
  • Perhaps hide the drag handle until some other condition is met, at which point you show it? Should be fairly simple with a bit of jQuery to modify the CSS. – Joe Glover Mar 23 '18 at 12:35

0 Answers0