You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @IonDen
I want to use the range slider for the price but in the input field its take a direct number so we can't readable properly price value so any js changes for some space or comma for value like($1000 but I want it $1 000 or $1,000); https://prnt.sc/20iiywu
Thank you
The text was updated successfully, but these errors were encountered:
General rule is - in slider I show prettified parameters like $1,000, but input receives plain number 1000.
This is done so, because these numbers could be used for other calculations in different parts of your project business logic.
But, if you really want the input field with prettify applied to it - you will have to do it yourself as a separate functionality.
But you will need to do a double mutation of that value from number 1000 to string 1,000 and back.
Prettify function used in slider is looking like this:
functionprettify(num,separator){letn=num.toString();returnn.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+separator);}// and now you can do a mutationprettify(1000,' ');// 1 000prettify(10000,',');// 10,000
Hello @IonDen
I want to use the range slider for the price but in the input field its take a direct number so we can't readable properly price value so any js changes for some space or comma for value like($1000 but I want it $1 000 or $1,000);
https://prnt.sc/20iiywu
Thank you
The text was updated successfully, but these errors were encountered: