mytooyo / board_datetime_picker

Picker to select date and time for Flutter. It is both a calendar and a picker, offering a variety of options as a package.
BSD 3-Clause "New" or "Revised" License
14 stars 12 forks source link

Keyboard appears when accidentally pressing a date value in the slider #31

Closed Jamerze closed 6 months ago

Jamerze commented 6 months ago

Screenshot_20240531_101610

Hello, while using the slider widget of this plugin, I accidentally pressed on the month field and noticed that my keyboard appeared which made me able to edit the field and enter (e.g.) 56. This is also possible for the day and year field. I couldn't localize it in the code, but is there a way to disable this and prevent the keyboard from opening?

Furthermore, the calendar works really well and is great to use. Thanks for providing this plugin :)

mytooyo commented 6 months ago

@Jamerze Thank you for the feedback!

Am I correct in saying that the keyboard should not appear when I tap on the selected date in the center of the picker? (Is this a mode that does not require keyboard input?)

Jamerze commented 6 months ago

@mytooyo Hi, thank you for the quick response. I just realized this is actually a feature and not a bug to quickly set the day, month or year in the slider so that you not always have to scroll. But in our case we'd indeed like to prevent the keyboard from appearing and would like to only use the slider functionality (so no keyboard input) if possible.

mytooyo commented 6 months ago

@Jamerze Yes. I have implemented the ability to enter text as well as scroll. I think that there are cases where you may want to use only a simple Picker, so I will add an option.

mytooyo commented 6 months ago

Added inputable option. Setting it to false will prevent the keyboard from being displayed.

options: BoardDateTimeOptions(
  inputable: false,
)

Please try v1.6.6.

Jamerze commented 6 months ago

@mytooyo Thanks! Works really well.