Both are acceptable. It doesn't matter in spoken language because they sound the same. My perception (although this may be incorrect) is that i dag is more formal and a bit more archaic, while idag is less formal and more modern. I suggest that you choose one and stick to it.
The odd thing is that I was taught "idag", igår" och "imorgon" in school, but the recommended forms have changed (I don't know when). I think it makes sense though if you compare to "i förrgår" (the day before yesterday), "i eftermiddag" (this afternoon) or "i sommar" (this summer) etc which are split.
As noted above, i dag and idag are both fine spellings. But Duolingo apparently first compares what you wrote to the default translation and then never bothers to check alternate translations. I get the same typo alert, which is obviously incorrect. But I'm afraid I can't fix it without making both spelling variations into defaults.
Is it more idiomatic in Swedish to phrase mention of which day of the week it is like this instead of a construction like 'Idag är tisdag.'? Kind of curious because most languages I know of that allow for such flexibility tend to prefer the shorter sentence outside of very formal settings.
I generally don't like to use English approximations, since those tend to give a very wrong idea of the pronunciation.
Having said that, the -dag in tisdag can be either short or long. If it's long, then it has the same pronunciation as in tisdag. And if it's short, it doesn't.