   it 'sets the default due date when based on query string', ->
     helper(NEW_READING, {due_at: getISODateString(dayAfter)} ).then ({dom, element}) ->
       dueAt = TaskPlanStore.getDueAt(NEW_READING.id)
-      expect(getDateString(dueAt)).to.be.equal(getDateString(dayAfter))
+      expect(getISODateString(dueAt)).to.be.equal(getISODateString(dayAfter))
       expect(dom.querySelector('.-assignment-due-date .datepicker__input-container input').value)
         .to.be.equal(getDateString(dayAfter))

      element.setIndividualPeriods()

      fakePeriodDisable(element, disabledPeriod)
      element.setDueAt(new Date(dayAfter), anotherPeriod)
      element.setDueAt(new Date(tomorrow), period)

      dueAt = TaskPlanStore.getDueAt(NEW_READING.id)
      expect(dueAt).to.not.be.ok

      dueAt = TaskPlanStore.getDueAt(NEW_READING.id, period.id)
      expect(getDateString(dueAt)).to.be.equal(getDateString(tomorrow))

  it 'sets the correct moment timezone on mount', ->
    courseId = COURSES[0].periods[0].id


      fakePeriodDisable(element, disabledPeriod)
      fakePeriodDisable(element, anotherDisabledPeriod)
      element.setOpensAt(getISODateString(dayAfter), period)

      opensAt = TaskPlanStore.getOpensAt(NEW_READING.id)
      expect(opensAt).to.not.be.ok

      opensAt = TaskPlanStore.getOpensAt(NEW_READING.id, period.id)
      expect(getISODateString(opensAt)).to.be.equal(getISODateString(dayAfter))

  it 'can update due date for individual period', ->
    period = COURSES[0].periods[0]
