the date is a month earlier?

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 want that this value is updated on the fly on the browser, you will need Javascript for that to work.
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 forms.Field, documentation.

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?