updated dateCompare with component