Yeah it's doable. Keukenhof is open until 7:30pm (last entrance at 6pm). So you can spend the morning and early afternoon in Delft, then take the train to Haarlem (it's on the same train line) and from there the direct bus to the gardens. Best to visit Delft on a Sunday when the outdoor markets are operating. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.