Support js date objects and DateTime objects as first and last date