How to restrict end date before start date after selected start date in React.JS or in html input type=date””

function App() { let [account, setAccount] = React.useState({ startdate: “”, enddate: “”, reason: “”, leavetype: “”, }); function handleChange(e) { let name = e.target.name; let value = e.target.value; account[name] = value; setAccount(account); } function Submit(e) { e.preventDefault(); console.log(account); } return ( <div> <fieldset> <form className=”” method=”post” onSubmit={Submit}> Start Date: <input type=”date” name=”startdate” min={new Date().toISOString().split(“T”)[0]} onChange={handleChange} … Read more

Edit a line in a file depending on user’s input | Python

I’m working on a contact book application to improve my python skill, so far I’ve created functions to add new contact, view existing contact, but I’m stuck on a function to edit them, I don’t know how to tackle this task (note that editing and adding information is based on user input), currently the only information this application is recording are name, phone number and/or email (if user entered an email).