I have a Maytag dishwasher (appears to be made by Whirlpool) that's been doing something similar. I found a service sheet under the kick panel that described how to put the dishwasher in test mode, and the results from that said the problem was in the control panel (touch panel).
I unplugged the panel and sprayed both sides of the connector with electronics cleaner and brushed it down thoroughly as best I could with a stiff bristle brush. Once I plugged it back in it seemed to be working fine for about three weeks until it started doing that again. My first cleaning didn't help, but doing it once more got it going again.
I'm not sure what my next steps are, as this is an older model dishwasher and I can't find anywhere online selling the control panel for less than about $175, far more than the dishwasher is worth. So it'll probably get scrapped if it gets to the point where cleaning doesn't help any longer.