Unlike the minimum number of days, there's no hard setting to set a maximum number of days.
A few things you can do:
1. In your property details suitability section, make sure the box "Long-term Renters Welcome" is not checked.
2. Assuming you are on the new rates editor, don't enter a discount for monthly stays (longer than 28 days). This generally will make your property prohibitively expensive for online booking for a month plus, and will prompt an inquiry for a quote (for which you can reply that you don't offer long-term term stays)
3. Unless you typically have check-in and check-outs scattered every day of the week (i.e., Sunday changeovers are not typical for you), some owners create a nightly one-day block on strategic days throughout the year to force travelers to book within certain blocks of time. Alternatively you can set the "allow check in/out" on certain dates of your choosing.
4. If you have IB set, and you're really worried, change to 24-hour decision. When you get a booking request that is longer than 30 days, tell the traveler that you cannot accommodate the dates and instruct them to withdraw the request. It's "ding" free when travelers withdraw: https://help.homeaway.com/articles/How-do-I-withdraw-my-pending-booking-request