I believe that it depends who they are to you.
If the loved one is cranky, moreover- your life partner/boyfriend/girlfriend, that is contagious.
Being around irritable people in the work environment is not nice, however they would not spoil the mood, in a long run - it would be one reason to change the job because who wants to be in negative energy?
However positive or indifferent one is, anyway it is the best to choose the company wisely where one can be joyful, can learn, grow and feel inspired.