Dynamic min and max value for handles are not being applied
See original GitHub issueI am attempting to dynamically change my slider from chronological dates to chronological time. I am able to get the labels and increments correct, but the handles are not changing to their appropriate min and max values that are being set with two binding.
The handles are maintaining their long epoch values from the date even though I have change them in the code below.
<ng5-slider [(value)]="minValue" [(highValue)]="maxValue" [options]="options" (userChange)="onChange($event)"></ng5-slider>
The handles are maintaining their long epoch values from the date even though I have change them in the code below.
this.minValue = 0;
this.maxValue = 1440;
this.options = {
floor: 0,
ceil: 1440,
stepsArray: this.createTimeRange().map((number: number) => {
return { value: number };
}),
translate: (value: number, label: LabelType): string => {
const hours: number = Math.floor(value/60);
const hoursString = (hours < 10) ? "0" + hours : "" + hours;
const minutes: number = value % 60;
const minutesString = (minutes < 10) ? "0" + minutes : "" + minutes;
return hoursString + ":" + minutesString;
},
showSelectionBar: true,
noSwitching: true
};
I have looked at your stackblitz examples and I cannot get it to recreate there. The only thing I didn’t recreate were the options variable.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
jQuery slider problem reaching min and max values
In your 'slide' callback, try using ui.value to get the value. This solved my problem. See jQuery UI slider - can't slide to...
Read more >Step not working correctly when changing Min/Max - Syncfusion
Now I change at runtime the value of 'Days', to 200, and call StateHasChanged(). The slider reflects the new situation, and I can...
Read more >A guide to the min(), max(), and clamp() CSS functions
The min(), max(), and clamp() CSS functions can revolutionize web layouts, but they can also make CSS much more difficult to reason about....
Read more >Dynamic scaling for Amazon EC2 Auto Scaling
Amazon EC2 Auto Scaling supports the following types of dynamic scaling ... that the new capacity never goes outside of the minimum and...
Read more >Maximum capacity specifications for SQL Server
Maximum values of various objects defined in SQL Server databases, ... size is the size of the tabular data stream (TDS) packets used...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

A workaround using
setTimeout()is possible, but shouldn’t be necessary now. I just released v1.1.12 of slider which should fix this. Can you re-test your code with the new version?@piotrdz Awesome, looks good and fixes my issue.