I also have hard water where I live, and I've found that leaving a cup (or two, if it's really bad) right-side up in the top rack and filling them with white vinegar before a wash will completely prevent any mineral buildup from forming in the load, as the acidity in the vinegar allows the minerals to dissolve into the water.
(if your water is only kinda hard, you can try only adding vinegar every second or third load, once you notice the mineral build-up. Even if you're in a really hard-water area, worth experimenting with how much you really need).