Definindo um intervalo de data usando Yup no React Date Picker

const YourSettingSchema = Yup.object().shape({
  dateOfBirth: Yup.string()
    .nullable()
    .test('Date of Birth', 'Should be greather than 18', function(value) {
      return moment().diff(moment(value), 'years') >= 18;
    }),
});
Envious Eagle