Skip to content

Commit

Permalink
Merge pull request #212 from rdkmaster/live-demos
Browse files Browse the repository at this point in the history
issue167
  • Loading branch information
rdkmaster authored Sep 25, 2017
2 parents b58c79f + 1973e6a commit da23b75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jigsaw/component/time/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,13 @@ export class JigsawTime extends AbstractJigsawComponent implements ControlValueA
private _propagateChange:any = () => {};

public writeValue(newValue: any): void {
if (!newValue) {
if (!newValue || newValue == this._value) {
// 此处也会过滤掉newValue是格式化过的,并且与_value相等的情况
return;
}
newValue = TimeService.convertValue(newValue, <TimeGr>this.gr);
if (newValue == this._value) {
// 此处把newValue格式化后,与_value比较,过滤掉相等的情况
return;
}
if (this._value && this.gr == TimeGr.week) {
Expand All @@ -625,7 +627,6 @@ export class JigsawTime extends AbstractJigsawComponent implements ControlValueA
if (newValueYear == valueYear && newValueWeek == valueWeek) return;
}
let [value,] = this._handleValue(newValue);
// this._value = value;
this._setDate(value);
}

Expand Down

0 comments on commit da23b75

Please sign in to comment.