Fixed start date time issue in JS