   # @public
   #
   fillDateRange: ->
+    date = require 'lang/date'
+    dateForElement = (require 'dom/date').forElement
+    type = require 'lang/type'
     formatString = e.download.date.format or 'MM/dd/yyyy'
 
     opts   = e.download.date

      # use default or today's date if we can't get a date from the field
      to.date ||= getDefault(opts.defaults && opts.defaults.to) or new Date()

      log.info "Adjusting date upper bound: ", to.date

    if fromEl
      # if there's a lower bound, choose a week before it to ensure some overlap

type           = require 'lang/type'
event          = require 'util/event'
prefs          = require 'util/prefs'
inspect        = require 'util/inspect'
dir            = require 'io/dir'
file           = require 'io/file'
