There are two date type inputs on the page. The first one displays the current date. How to display the date a month earlier in the second one? For example, in the first 01.05.2023, in the second 01.04.2023. In general, you just need to take away a month. What is the best way to do it? Thanks!
If you only want to add this when the page is loaded for the first time, i suggest you to take a look into the
initial parameter of a
Additionally, you may also want to look at the Python
timedelta object for doing the math to subtract a month.
What is 1 month earlier than March 31st?