Skip to content

Commit

Permalink
fix of #757
Browse files Browse the repository at this point in the history
  • Loading branch information
AJIXuMuK committed Dec 13, 2020
1 parent 1c73e63 commit 0eb9159
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/controls/dateTimePicker/HoursComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export default class HoursComponent extends React.Component<IHoursComponentProps
if (renderDropdown) {
return (
<Dropdown
disabled={this.props.disabled}
disabled={disabled}
label=''
options={this._hours}
selectedKey={value}
onChanged={option => {
onChange(option.text);
}}
Expand Down Expand Up @@ -121,12 +122,12 @@ export default class HoursComponent extends React.Component<IHoursComponentProps
}
}

let selected: boolean = false;
/*let selected: boolean = false;
if (i === value) {
selected = true;
}
}*/

hours.push({ key: i, text: digit, isSelected: selected });
hours.push({ key: i, text: digit });
}

this._hours = hours;
Expand Down
9 changes: 5 additions & 4 deletions src/controls/dateTimePicker/SecondsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export default class SecondsComponent extends React.Component<ITimeComponentProp
if (renderDropdown) {
return (
<Dropdown
disabled={this.props.disabled}
disabled={disabled}
label=''
options={this._seconds}
selectedKey={value}
onChanged={option => {
onChange(option.text);
}} />
Expand Down Expand Up @@ -76,11 +77,11 @@ export default class SecondsComponent extends React.Component<ITimeComponentProp
} else {
digitSec = k.toString();
}
let selected: boolean = false;
/*let selected: boolean = false;
if (k === this.props.value) {
selected = true;
}
seconds.push({ key: k, text: digitSec, isSelected: selected });
}*/
seconds.push({ key: k, text: digitSec });
}

this._seconds = seconds;
Expand Down
2 changes: 2 additions & 0 deletions src/webparts/controlsTest/components/ControlsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
<PrimaryButton text={'Change Date'} onClick={() => {
const date = this.state.dateTimeValue || new Date();
date.setMinutes(50);
date.setHours(11);
date.setSeconds(12);
this.setState({
dateTimeValue: date
});
Expand Down

0 comments on commit 0eb9159

Please sign in to comment.