Skip to content

Commit

Permalink
valid age range now pulls from startdate in defaults.jsu
Browse files Browse the repository at this point in the history
  • Loading branch information
avsomers25 committed Sep 30, 2023
1 parent 027e68e commit 4f3d95b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Footer from "./components/Landing/Sections/Footer";
const defaults = {
title: "HackRU Fall 2023",
dateText: "February 25th - 26th, 2023",
startdate: "10/7/2023",
locationText: "Rutgers College Ave Student Center",
universityText: "Rutgers University",
slogan: "hack all knight",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AvForm, AvField } from "availity-reactstrap-validation";
import Select, { Creatable } from "react-select";
import CustomAVInput from "../CustomAVInput";
import { Icon } from "react-fa";
import { theme } from "../../../../../Defaults";
import { theme, defaults } from "../../../../../Defaults";
import selectorOptions from "../selectorOptions.json";
import { ProfileType } from "../../../../Profile";
import PropTypes from "prop-types";
Expand All @@ -13,7 +13,7 @@ import { PulseLoader } from "react-spinners";

class About extends Component {
// constructor(props) {
// super(props);
// super(props
// this.updateUser = this.updateUser.bind(this);
// }
UNSAFE_componentWillMount() {
Expand Down Expand Up @@ -69,6 +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);
if (this.state.edit) {
return (
<AvForm
Expand Down Expand Up @@ -133,8 +135,9 @@ class About extends Component {
value: "01/01/1920"
},
end: {
value: "02/25/2005"
value: tempdate.toLocaleDateString()
}

} }} />
</Col>
<Col xs={(mobile) ? 12 : 4}>
Expand Down

0 comments on commit 4f3d95b

Please sign in to comment.