|
|
|
|
@ -29,9 +29,28 @@ class _DynamicElementsState extends State<DynamicElements> {
|
|
|
|
|
var selectedDate = DateFormat.yMd().format(pickedDate);
|
|
|
|
|
|
|
|
|
|
if (id == '_selectedFromDate') {
|
|
|
|
|
_fromDateController.text = selectedDate;
|
|
|
|
|
// _fromDateController.text = selectedDate;
|
|
|
|
|
selectedDate = pickedDate.year.toString() +
|
|
|
|
|
"-" +
|
|
|
|
|
pickedDate.month.toString().padLeft(2, '0') +
|
|
|
|
|
"-" +
|
|
|
|
|
pickedDate.day.toString().padLeft(2, '0');
|
|
|
|
|
|
|
|
|
|
_fromDateController.text = selectedDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectedDate = pickedDate.year.toString() +
|
|
|
|
|
"-" +
|
|
|
|
|
pickedDate.month.toString().padLeft(2, '0') +
|
|
|
|
|
"-" +
|
|
|
|
|
pickedDate.day.toString().padLeft(2, '0');
|
|
|
|
|
|
|
|
|
|
_toDateController.text = selectedDate;
|
|
|
|
|
// _toDateController.text = selectedDate;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
@ -72,8 +91,11 @@ class _DynamicElementsState extends State<DynamicElements> {
|
|
|
|
|
if (_fromDateController.text.toString().trim().isEmpty) {
|
|
|
|
|
widget._patientSearchFormValues.From = "0";
|
|
|
|
|
} else {
|
|
|
|
|
widget._patientSearchFormValues.From =
|
|
|
|
|
_fromDateController.text;
|
|
|
|
|
widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// _fromDateController.text;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -103,7 +125,7 @@ class _DynamicElementsState extends State<DynamicElements> {
|
|
|
|
|
if (_toDateController.text.toString().trim().isEmpty) {
|
|
|
|
|
widget._patientSearchFormValues.To = "0";
|
|
|
|
|
} else {
|
|
|
|
|
widget._patientSearchFormValues.To = _toDateController.text;
|
|
|
|
|
widget._patientSearchFormValues.To = _toDateController.text.replaceAll("/", "-");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|