Yes, the tenant is still liable for paying the full 30 days rent, despite moving out earlier than the 30 days.
As the landlord, you are entitled to deduct said rent from the security deposit. Just make sure you give written notice of the fact that you are deducting for the rent. Under California Civil Code section 1950.5, within 21 calendar days after a tenant moves out, the landlord must either send a full refund of the security deposit, or mail or personally deliver to the tenant an itemized statement that lists the amounts of any deductions from the security deposit and the reasons for the deductions, together with a refund of any amounts not deducted. This is important because according to the California Supreme Court decision in the case of Granberry v. Islay Investments (1995) 9 Cal.4th 738, 745, after the 21 days have transpired, the landlord loses the right to keep any of the security deposit and must return the entire deposit to the tenant.
Frank W. Chen has been licensed to practice law in California since 1988. The information presented here is general in nature and is not intended, nor should be construed, as legal advice. This posting does not create any attorney-client relationship with the author. For specific advice about your particular situation, consult your own attorney.