Set datetimepicker as required field

Hi,

I have a datetimepicker in a retool app, and it is a required field for the operation I’m performing, but unlike other controls, it doesn’t offer a ‘required field’ setting in the right-hand pane, and so can be blank on form submit. Should this be available?

update: just found a reference to the same problem on a post in ‘feature requests’ from may 2.

Any workarounds?

Update again: there is a way to prevent form submission when this field is empty, which I have implemented, but this is pretty dodgy - users see the red asterisk by required fields, but nothing beside the field that is preventing them from submitting the form - so have no way of knowing why the submit button is greyed out. I could put some text on the form telling them this, but that must look very inconsistent to a user.

Thanks,

Joshua

Hey @jconroy - you’re correct, we need to work on this. For now, you can use a text input component with the datetime-local type instead of the datetimepicker component - would that work?

Thanks for confirming that, Justin.

As far as I am aware, if you use a text input component with the datetime-local type, you get no date-picking functionality (have to simply type dates out, also confusing and inconsistent for users using date pickers elsewhere), so I have stuck with the datetimepicker, preventing submission at the form validation level, and explaining to users with a clunky on-form piece of text. It’ll be great when that is fixed.

Thanks,

Joshua

@jconroy the datetime-local type for a textinput does have date picking functionality! Just click on the little calendar icon: