ArcaneFormattedInput.date constructor
ArcaneFormattedInput.date({})
Implementation
factory ArcaneFormattedInput.date({
String? initialMonth,
String? initialDay,
String? initialYear,
void Function(FormattedValue value)? onChanged,
String? label,
String? error,
bool disabled = false,
}) {
return ArcaneFormattedInput(
initialValue: FormattedValue([
const InputPart.editable(length: 2, width: 40, placeholder: 'MM', inputType: 'number')
.withValue(initialMonth ?? ''),
const InputPart.static('/'),
const InputPart.editable(length: 2, width: 40, placeholder: 'DD', inputType: 'number')
.withValue(initialDay ?? ''),
const InputPart.static('/'),
const InputPart.editable(length: 4, width: 60, placeholder: 'YYYY', inputType: 'number')
.withValue(initialYear ?? ''),
]),
onChanged: onChanged,
label: label ?? 'Date',
error: error,
disabled: disabled,
);
}