Elderly residents were stranded in their rooms for over two weeks after a lift broke down in their sheltered housing complex.