InputDateRangePicker constructor

InputDateRangePicker({
  1. Key? key,
  2. NepaliDateTime? initialStartDate,
  3. NepaliDateTime? initialEndDate,
  4. required NepaliDateTime firstDate,
  5. required NepaliDateTime lastDate,
  6. required ValueChanged<NepaliDateTime?>? onStartDateChanged,
  7. required ValueChanged<NepaliDateTime?>? onEndDateChanged,
  8. String? helpText,
  9. String? errorFormatText,
  10. String? errorInvalidText,
  11. String? errorInvalidRangeText,
  12. String? fieldStartHintText,
  13. String? fieldEndHintText,
  14. String? fieldStartLabelText,
  15. String? fieldEndLabelText,
  16. bool autofocus = false,
  17. bool autovalidate = false,
})

Display a InputDateRangePicker in which the user can input a date range. The firstDate and lastDate are required and must not be null. The initialStartDate and initialEndDate default to null and must be between firstDate and lastDate. The onStartDateChanged and onEndDateChanged callbacks must be provided and must not be null.

Implementation

InputDateRangePicker({
  super.key,
  NepaliDateTime? initialStartDate,
  NepaliDateTime? initialEndDate,
  required NepaliDateTime firstDate,
  required NepaliDateTime lastDate,
  required this.onStartDateChanged,
  required this.onEndDateChanged,
  this.helpText,
  this.errorFormatText,
  this.errorInvalidText,
  this.errorInvalidRangeText,
  this.fieldStartHintText,
  this.fieldEndHintText,
  this.fieldStartLabelText,
  this.fieldEndLabelText,
  this.autofocus = false,
  this.autovalidate = false,
})  : initialStartDate =
          initialStartDate == null ? null : utils.dateOnly(initialStartDate),
      initialEndDate =
          initialEndDate == null ? null : utils.dateOnly(initialEndDate),
      firstDate = utils.dateOnly(firstDate),
      lastDate = utils.dateOnly(lastDate);