Joseph Blackburn, 28, of no fixed abode, pleaded guilty to criminal damage at Barnsley Magistrates’ Court on Tuesday.
Blackburn was arrested last Sunday after he targeted the marked Peugeot 308, which was parked outside Barnsley Police Station.
Chief Inspector Andy Berriman said he was pleased Blackburn had been given time in prison for his actions.
He added: “We have a zero-tolerance to individuals causing damage to police property and I hope this result sends a strong message to communities that we will take action and prosecute.
“This reckless act of vandalism took a police car off the road, meaning it could not respond to emergencies and people in need until it was fixed.
“The fixing of the vehicle uses public money that could be spent elsewhere across the force.
“I am disheartened to think that people would treat the vehicles that serve their communities with little respect. I hope Blackburn reflects on his actions while serving his sentence.”