I need help with coding

I built code on both the server and client sides, which is a calendar for me to record my work shifts. The code works great, but the only problem is that when, for example, a week passes, the data moves to the next week. However, on the day the code is reset and just start working, It works perfectly without any bugs, allowing me to seamlessly navigate and record data both forward and backward in weeks. So, I wanted to know whether it is better for me on the server to perform the calculations if a week has passed since the code has reset, or on the client side :confused:

Here is the client side code

Here is the server side code

I didn’t look at your code yet, however it is usually best to store data on the server side/backend. I’ll look at it in a few hours. Just out of curiosity, are you storing the said data in a database? What’s your general plan for storage?

1 Like

I am using SQLAlchemy for my project. Up to this point, I have integrated the logic on both the client and server sides. While I understand that the server should primarily handle this task, I am confronted with the challenge of utilizing dates on the client side. Hence, I believe there is a need to combine both aspects or separate them, giving precedence to the server.