I have a material slider in my angular project which I want to have a value between 200 and 5000.
I set the min value to 200. 200 is a valid value. However, when I slide the slider to 200, it disables itself as if the value is invalid.
Any idea how to disable this behaviour?
Slider:
<mat-slider min="200"
max="5000"
step="100"
[value]="200"></mat-slider>
In fact the slider is not disabled but the color is set to grey for an unknown reason.
I solved with the following lines:
::ng-deep .mat-slider.mat-slider-min-value.mat-slider-thumb-label-showing.cdk-focused .mat-slider-thumb-label {
color: rgba(0, 0, 0, 0.87);
background-color: mat-color($my-app-primary);
}
::ng-deep .mat-slider.mat-slider-min-value.mat-slider-thumb-label-showing .mat-slider-thumb {
background-color: mat-color($my-app-primary);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With