Hard water leaves calcium deposits on glassware. These deposits appear as a white, cloudy haze along glass rims and other surfaces. Softening your water won't always prevent cloudy glassware issues; in some cases, it can make the problem worse, because the soft water may not remove all the dishwasher detergent. Detergent that is left behind can also leave a film on glassware, or even etch the glass over time. Remove the haze from your cloudy glassware immediately to avoid possibly compounding the problem through inattention.
Fill your dishwasher's rinse aid reservoir with a dishwasher rinse aid or white household vinegar to reduce water-spotting-related cloudiness. White vinegar should also help remove calcium deposits. Load your cloudy dishes into the dishwasher and run the unit.
Attack cloudy glasses that remain cloudy with a more direct application of vinegar. Fill a small plastic tub with equal parts water and white vinegar. Place a piece of cloudy glassware into the tub, and let it soak for a few hours. Rinse the glass in clean water, and wipe it dry. Cut a lemon in half, and rub the exposed fruit along the surfaces of glassware that is still cloudy.
Add a few teaspoons of fine sand to the inside of the glassware. Fill the interior a quarter full with denatured alcohol. Gently swirl this mixture inside your glassware, and rinse.