The metaphorical use of in the dark to mean “in a state of ignorance" dates from the late 17th century.
RELATED IDIOMS :
keep someone dangling
keep someone, especially a would-be suitor, in an uncertain position.
a dark horse
a person, especially a competitor, about whom little is known.
The expression was originally horse-racing slang. The earliest recorded use was by Benjamin Disraeli in 1831. A dark horse, which had never been thought of rushed past the grand stand in sweeping triumph.
keep someone in the dark
ensure that someone remains in a state of ignorance about something
2003 - Village Voice - It's payback time for an administration that has ignored lawmakers
and deliberately kept them in the dark.
keep something dark
keep something secret from other people.
1993 - New York Review of Books - Ottoline was determined to keep her affair with Russell safe from Bloomsbury's prying eyes and she and Russell went to Feydeauesque lengths to keep their secret dark.