0

In a sheet I have a column to enter a datetime value that would later be checked by a script to create a trigger. I would like to set a picker in that column to ease selection and avoid errors.

I know Google Sheets offers an option in Data Validation for date but not for time neither datetime.

However, I found this class in the Google Apps Script API

https://developers.google.com/apps-script/reference/card-service/date-time-picker

But I just do not know how to implement it in a sheet (e.g. with OnEdit() or SetDataValidation()) so any time I press enter any cell in that column the picker is called to select datetime and set cell value to that selection.

0

The referred class belongs to the Card Service which is only available for G Suite add-ons.

To build a custom date picker for Google Sheets you could use the HTML Service. For further details see https://developers.google.com/apps-script/guides/html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.