We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We're expanding our app to include Desktop versions.
Unforutently the DateTimeField is failing with an issue that seems to be Windows-specific.
When picking a time it's displaying the selected time but returns a time one hour in the future (on the 2nd of Jan 1970)
For example 11:34 AM becomes => 00:34 am (1970-01-02 00:34:00.000)
This is not affecting Android or iOS builds and seems to be specific to Windows.
implementation code looks like this:
return DateTimeField( format: DateFormat(getFormatString(widget.definition.inputType)), validator: getValidator(), decoration: InputDecoration( labelText: widget.definition.name, floatingLabelBehavior: FloatingLabelBehavior.never), onChanged: dateUpdated, autofocus: false, initialValue: widget.data, onShowPicker: (BuildContext context, DateTime? currentValue) async { DateTime? date; if (<InputType>[InputType.date, InputType.both] .contains(widget.definition.inputType)) { date = await showDatePicker( context: context, firstDate: DateTime(1900), initialDate: currentValue ?? DateTime.now(), lastDate: DateTime(2100)); if (date == null) { return currentValue; } } TimeOfDay? time; if (<InputType>[InputType.time, InputType.both] .contains(widget.definition.inputType)) { time = await showTimePicker( context: context, initialEntryMode: TimePickerEntryMode.dial, initialTime: TimeOfDay.fromDateTime(currentValue ?? DateTime.now()), ); if (time == null) { return currentValue; } } switch (widget.definition.inputType) { case InputType.date: return date; case InputType.time: return DateTimeField.combine(DateTime(0), time); case InputType.both: default: return DateTimeField.combine(date!, time); } }, );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We're expanding our app to include Desktop versions.
Unforutently the DateTimeField is failing with an issue that seems to be Windows-specific.
When picking a time it's displaying the selected time but returns a time one hour in the future (on the 2nd of Jan 1970)
For example 11:34 AM becomes => 00:34 am (1970-01-02 00:34:00.000)
This is not affecting Android or iOS builds and seems to be specific to Windows.
implementation code looks like this:
The text was updated successfully, but these errors were encountered: