Skip to content

Commit

Permalink
fix(module:slider): fix set value in slider (#743)
Browse files Browse the repository at this point in the history
* fix(module:datepicker): disable datepicker when user input

* feat(module:input-number): support formatter & parser
close #739

* fix(module:slider): fix set value in slider
  • Loading branch information
vthinkxie authored Dec 14, 2017
1 parent c7ddc4b commit d0a6793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/slider/nz-slider.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@ export class NzSliderComponent implements ControlValueAccessor, OnInit, OnChange

// check if value is valid and throw error if value-type/range not match
checkValidValue(value: SliderValue): boolean {
let parsedValue: number;
const range = this.nzRange;
if (value === null || value === undefined) {
return false;
} // it's an invalid value, just return
const isArray = Array.isArray(value);
if (!Array.isArray(value)) {
let parsedValue: number = value;
if (typeof value !== 'number') {
parsedValue = parseFloat(value);
}
Expand Down

0 comments on commit d0a6793

Please sign in to comment.