 
         if histParams.from
           fromDate = histParams.from
-#          fromDate = moment(histParams.from).format("DD-MM-YYYY")
 
         # When time-slider is used, hist_parameters.from is not supposed to be defined
         else if histParams.time_range

    # Get default year-to-date hist parameters
    @yearDates = ()->
      from: moment().startOf('year').format('YYYY-MM-DD')
#      from: moment().startOf('year').format('DD-MM-YYYY')
      to: moment().format('YYYY-MM-DD')

    # Parse a Rails model error and return an array of messages

          word = _self.getPeriodWord(period)
          if period == "w"
            fromDate = moment().subtract(n, word).startOf('isoweek').format('YYYY-MM-DD')
          else
            fromDate = moment().subtract(n, word).startOf(word).format('YYYY-MM-DD')

      resultHash = {
        from: fromDate
