I am trying to achieve this into my application
But I am not able to customise my code.
I just wanted to change
- Header color
- Pencil colour
- Selected date colour
- Background of time
- Background of clock dial
Also I am unable to display selected date and time dilogue
I used this code to work this
`IconButton(
onPressed: () {
showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: selectedDate.subtract(const Duration(days: 0)),
lastDate: DateTime.now().add(
const Duration(days: 7),
),
builder: (context, child) {
return Theme(
data: ThemeData.light().copyWith(
colorScheme: const ColorScheme.light(
primary: Colors.white,
onPrimary: Colors.black,
//onSurface: Colors.green,
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.blue, // button text color
),
),
),
child: child!);
},
).then((value) {
if (value != null) {
onPickUp(value);
showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
helpText: 'Pick-up Time',
).then((value) {
if (value != null) {}
});
}
});
},
icon: const Icon(Icons.calendar_today),
),
`
To customise date and time picker in flutter