RangeSlider issue

0
Hi Community, I am using a range slider 1 widget as shown below. I am linking the slider values to the two text boxes one is the minimum text box and the other is maximum text box to hold the minimum and maximum values. Currently the textbox type is decimal, so when i give alphabhets it give the default error as shown below.   Is there any way to  avoid this  invalid message so that i can implement the my own custom msg as per the requirement?   or is there any widget available which has the combination of text box and the slider together which is the requirement in my case?     Thanks in Advance!
asked
1 answers
0

A is obviously not a number so the error seems correct if a decimal is needed as input :-).

On a more generic note, it always pays to check if the input type matches the slider’s input types. Sometimes they want strings, and when you feed decimals, then you need to parse those numbers to strings with the available Mendix functions for that.

However, if you want to have a series of ranges to choose from for ranges, designated by, say, a, b, c, or other strings, then as a possible workaround then, you might need to define an entity called “stringrange” or something, and have attributes string (1—n characters as needed) and then two decimals attributes (one min, other max range). Then add a grid or list view in some page, or above the range slider, in the UI where a user can select the range needed. This will then show a series of range sets with name as string, min, and max number ranges (in decimals).

Then, once you’ve selected range set a for example, the application should set the min/max ranges for the slider inputs.

There are so many possible options here its not possible to be more precise I think, other than maybe the above being some general direction you could look at.

answered