PD: Dad left 4-year-old in locked car for 2 hours while he was inside courthouse for hearing