Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

noxioustoo's avatar

noxioustoo wrote a reply+100 XP

5mos ago

You can set form data and then immediately submit like that:

const updateDate = (d) => {
	data.due = new Date(d).toLocaleDateString("en-US");
    put(`/${project.client.short_name}/${project.job_code}`);
};

data is initially an empty object. So you don't have to pass any initial object like in your code, if you don't want to.