Skip to content

Added alt_min and and alt_max - #346

Open
fdeweger wants to merge 1 commit into
IonDen:masterfrom
fdeweger:alt-min-max
Open

Added alt_min and and alt_max#346
fdeweger wants to merge 1 commit into
IonDen:masterfrom
fdeweger:alt-min-max

Conversation

@fdeweger

@fdeweger fdeweger commented Feb 5, 2016

Copy link
Copy Markdown

Added an option to use an alternative value in the underlying input for minimum and maximum.

This is useful for people who are using Solr. Solr specifies ranges in the following format:

price:[1000+TO+2000]

However if you don't want to have an upper bound in your query, you'll have to use the following in your query to Solr:

price:[1000+TO+*]

By using the alt max feature, you have the option to let the user filter on ranges of prices, but if they drag the slider all the way to the right, there will be no upper bound. You'll probably want to use this together with the max postfix option.

I think the the alternative minimum feature is a lot less useful, but I've included it for completeness sake.

Added an option to use an alternative value in the underlying input for min and max.
@IonDen

IonDen commented Feb 5, 2016

Copy link
Copy Markdown
Owner

Hello, thanks for this PR. Could you create a small demo with feature here: http://jsfiddle.net/IonDen/726L0aj5/

Just replace external ion.rangeSlider.js to yours.

@IonDen IonDen added the Feature request Request for a new functionality label Feb 5, 2016
@IonDen IonDen self-assigned this Feb 5, 2016
@fdeweger

fdeweger commented Feb 5, 2016

Copy link
Copy Markdown
Author

Hi, i've updated the fiddle. I've never used js fiddle before, and I didn't see the 'fork' button untill i was almost done. I hope i didn't ruin your fiddle.

If you have any remaining questions, feel free to ask them :)

@IonDen

IonDen commented Feb 5, 2016

Copy link
Copy Markdown
Owner

Your forgot to post here a link to updated fiddle)
You can't ruin old fiddle, new fiddle always will have a version number in url.

@IonDen

IonDen commented Feb 5, 2016

Copy link
Copy Markdown
Owner

Hey, but on this fiddle you didn't replace original ion.rangeSlider.js to your new one. So i can't test your changes.

@fdeweger

fdeweger commented Feb 5, 2016

Copy link
Copy Markdown
Author

Yeah, i already spotted that and deleted my original comment.... Sorry...

This one works: http://jsfiddle.net/726L0aj5/3/

@apemsel

apemsel commented Feb 19, 2016

Copy link
Copy Markdown

Great work, I was just about to add this feature myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request Request for a new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants