As long as the lease is not for more that 1 year, it is legal. Typically such leases are known as "month-to-month". This means that either party can end it (i.e. the landlord or the tenant), on 30 days notice.