vph_web_date_picker 0.0.3 vph_web_date_picker: ^0.0.3 copied to clipboard
Flutter date picker package for web application.
Flutter Date Picker for Flutter Web application #
Usage #
final textFieldKey = GlobalKey();
...
TextField(
key: textFieldKey,
controller: _controller,
onTap: () async {
final pickedDate = await showWebDatePicker(
context: textFieldKey.currentContext!,
initialDate: _selectedDate,
firstDate: DateTime.now().add(const Duration(days: 1)),
lastDate: DateTime.now().add(const Duration(days: 14000)),
);
if (pickedDate != null) {
_selectedDate = pickedDate;
_controller.text = pickedDate.toString();
}
},
),
...