When using a date/time picker UI element in iOS, the keyboard always pops up hiding the cancel/apply button. Clicking “Done” on the keyboard hides it, but then changing the time makes the page scroll and hides the Apply/Cancel buttons again.
Not the most user friendly UI on mobile. Would be great to have more of a “mobile-first” experience for this UI widget.
@meredydd How about adding date/datetime-local/time as type parameters to either the TextBox component or the option to fallback to them in the DatePicker component? They both seem to work really well on mobile.
I tried to manually set self.my_text_box.type = 'date' in my init – but anvil seems to ignore that.
I can’t see where you build the calendar display, or if you import it, or…well…anything really.
For simple people like me, would you be kind enough (if you have the time) to explain how that does what it does, especially around displaying the calendar on the screen?
I had no idea displaying a datetime picker was that easy! Thank you for that.
If there’s anyone else like me who was unaware of all the input types available, here’s a convenience link to add to the ones @erik posted above which shows them :
Can you help me understand the behavior of the input field? I find it impossible to type the date out in the field and my only option is to use the date picker function. When typing, it does not allow me to type a 2 digit day or month, but keeps resetting the value to 0.
But as i recently made use of this custom component (which imo is awesome, let’s be honest… so just for that, thank you), i faced some weird challenges.
And i honestly don’t think a new post for this particular component would be best…
The problem
For a native datepicker component, whenever the date is changed from the code, i.e. like this :
native_datepicker.date = a_datetime_variable
the native_datepicker_change event is also triggered…
i don’t know if it’s just me or what…
But @erik, if you know what it is all about, i beg for your help as i can’t go back to the anvil basic datepicker…