import moment from 'moment'

export default function validateDateRange(options) {
  return (key, newValue) => {
    let date = moment(newValue)

    return date >= moment(options.min) && date <= moment(options.max)
  }
}

import moment from 'moment'

export default function validateDateRange(options) {
  return (key, newValue) => {
    let date = moment.utc(newValue)

    return date >= moment.utc(options.min) && date <= moment.utc(options.max)
  }
}

Validate dates using UTC timezone
Validate dates using UTC timezone

Fixes #57
