Notwithstanding Section 19839, upon applying for retirement, a person entitled to a lump-sum payment for any unused or accumulated annual leave may elect to take all or any portion of that annual leave rather than accept the lump-sum payment on or prior to the effective date of retirement.
Ca. Gov. Code § 19858.7