Sorry about that. I didn't notice the date.
I'll double-check when Gilmor withdrew south of the Potomac. It is also possible that the date cited (July 18) is incorrect. I've come across dozens of instances where a date listed in a source is actually several days off from the date of the actual battle. Typos are quite common.
For example, the July "18" could have been July "10" or July "13" and mis-read when it was transcribed. Gilmor was certainly operating in Baltimore County July 10-13.
I believe Gilmor wrote an account of his operations during the 1864 Maryland campaign. You may want to look that up. I know for a fact that he was in the Cockeysville area at some point in July 1864.