Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Jan 23, 2025
1 parent 34d623c commit 456c3f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app-typescript/components/DateTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MIN_WIDTH = 348;
export class DateTimePicker extends React.PureComponent<IProps> {
handleTimeChange = (time: string) => {
const [hours, minutes] = time.split(':').map((x) => defaultTo(parseInt(x, 10), 0)); // handle NaN value
const origDate = cloneDeep(this.props.value) ?? new Date();
const origDate = this.props.value ? new Date(this.props.value) : new Date();

origDate.setHours(hours, minutes);

Expand Down

0 comments on commit 456c3f5

Please sign in to comment.