RangeSliderInterval doesn't return formatted IntervalStart/IntervalEnd
Question
Application Type
Reactive
Service Studio Version
11.14.5 (Build 57418)

Hi,

I'm using RangeSliderInterval with following AdvancedFormat property to show tooltips and pipes in a format, "yyyy/M".

"{
  tooltips: true,
  format: {
    to: function(value) {return Math.trunc(value/12) + '/' + (value%12 + 1);},
    from: function(value) {return Number(value.substring(0,4)) * 12 + Number(value.substring(5)) * 12;}
  },
  pips: {
    format: {
      to: function(value) {return Math.trunc(value/12) + '/' + (value%12 + 1);},
      from: function(value) {return Number(value.substring(0,4)) * 12 + Number(value.substring(5)) * 12;}
    }
  }
}"

Displaying tooltips is working as I expected, but OnChange event always returns "yyyy" part of interval values as input parameter no matter code I put in "from:" section of "format:". How can I handle this?


Tooltips and pipes are displayed in "yyyy/M" format as I expected:


Debugger shows only "yyyy" part of values are returned as input parameter of OnChange event:

mvp_badge
MVP
Solution

Hi Ron,

On trying the shared implementation, I also had the same observation. Unfortunately, I didn't find the technical reason for this, but I have a workaround to suggest for your case.

See this demo: RangeSliderIntervalDemo

Refer to the attached oml file

I hope this helps you!


Kind regards,

Benjith Sam

RWA_Lab_RangeSliderIntervalDemo.oml

Hi Benjith,


Thank you for the solution. It worked completely as I expected.


Best regards,

Ron

mvp_badge
MVP

You're welcome, Ron.

Glad to help you :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.