Collecting date/time input from the user on a form is as simple as adding a Date field to your Aras form. But what if you need to query the user for input during the execution of method code? The Call Date Dialog project on the Aras Labs GitHub page addresses exactly that scenario.
You can find all of the code and files for this demonstration on the Aras Labs GitHub page in the call-date-dialog project. If you want to install the project and follow along, the project page includes all of the instructions for installing the import package.
How the Project Works
Calling Date Dialog From Method Code
labs_CallDateDialog. This method calls a datepicker dialog and then executes a custom callback function with the selected date as a parameter. The callback function in this sample code simply displays the date parameter in a browser alert, but you could use the same approach to perform some other business logic with the selected date.
Here's the method code: