how to update app state on change in dateTime picker

Resolved

im trying to build a school schedule app for which i want to use a dateTime picker to select the date. i had it so the startTime variable of the api was set to the unix value of the picker, and the endTIme variable to that but added one day in unix. however, that means that it wont show anything before you pick a date, which i need to display the data for the current day. to fix this i had it instead rely on an app state variable which, when the page is loaded, is automatically set to the current day. how would i make it so when i change the date on my dateTime picker, the date is set as the new app state value?

tldr, how do i update an app state on value change in dateTime picker?

1
1 reply