dateRangeErrorText method

  1. @override
String dateRangeErrorText(
  1. DateTime min,
  2. DateTime max
)
override

No description provided for @dateRangeErrorText.

In en, this message translates to: 'Date must be in range {min} - {max}.'

Implementation

@override
String dateRangeErrorText(DateTime min, DateTime max) {
  final intl.DateFormat minDateFormat = intl.DateFormat.yMd(localeName);
  final String minString = minDateFormat.format(min);
  final intl.DateFormat maxDateFormat = intl.DateFormat.yMd(localeName);
  final String maxString = maxDateFormat.format(max);

  return '日期必須在允許的範圍內。';
}