Skip to content

Commit

Permalink
Minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmonisit committed Oct 4, 2023
1 parent 4f3d95b commit 83ce2d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class About extends Component {
update_user.gender = this.state.user.gender;
update_user.ethnicity = this.state.user.ethnicity;
update_user.hackathon_count = this.state.user.hackathon_count;

this.props.profile.Set(update_user)
.then(res => {
this.setState({
Expand All @@ -69,8 +69,8 @@ class About extends Component {
if (this.state.message) {
message = (<UncontrolledAlert color="danger">{this.state.message}</UncontrolledAlert>);
}
let tempdate = new Date(defaults.startdate);
tempdate.setFullYear((tempdate.getFullYear()) - 18);
let tempDate = new Date(defaults.startdate);
tempDate.setFullYear((tempDate.getFullYear()) - 18);
if (this.state.edit) {
return (
<AvForm
Expand Down Expand Up @@ -135,9 +135,9 @@ class About extends Component {
value: "01/01/1920"
},
end: {
value: tempdate.toLocaleDateString()
value: tempDate.toLocaleDateString()
}

} }} />
</Col>
<Col xs={(mobile) ? 12 : 4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Select, { Creatable, AsyncCreatable } from "react-select";
import ResumeUploader from "./ResumeUploader";
import CustomAVInput from "./CustomAVInput";
import { Icon } from "react-fa";
import { theme } from "../../../../Defaults";
import { theme, defaults } from "../../../../Defaults";
import request from "request";
import majors from "./majors.json";
import selectorOptions from "./selectorOptions.json";
Expand Down Expand Up @@ -47,6 +47,9 @@ class UserProfileForm extends Component {
this.props.onChange(user);
}
render() {
let tempDate = new Date(defaults.startdate);
tempDate.setFullYear((tempDate.getFullYear()) - 18);

let mobile = this.props.mobile;
let user = this.state.user;
let mlhnotices = [];
Expand Down Expand Up @@ -133,7 +136,7 @@ class UserProfileForm extends Component {
value: "01/01/1920"
},
end: {
value: "10/07/2005"
value: tempDate.toLocaleDateString()
}
} }} />
</Col>
Expand Down

0 comments on commit 83ce2d9

Please sign in to comment.