Showing Date Picker when Date Field is on Focus

By default, the Date field displays the date picker when end-users click on the Date field text box or the calendar icon. In case, if you need to display the date picker when the Date field is in focus, you can achieve that in any of the following two configurations:

1. Application-level (Global Configuration):

This code can be used in any listener file, not necessarily form's listener file. However, once this code is implemented, it will reflect globally at the application level. 

canvas.env.options.form.ShowDatePickerOnFocus ='true'; /* Here, * 'true' indicates that when Date field is in focus, * the date picker is displayed. * 'false' indicates that when Date field is in focus, * the date picker is not displayed. */

2. Form Item-level:

This code must be used in the form’s listener JS file. 

this.fm.registerHandler("cbxpreinitialize", function(fm, event, fieldName, value) { return { 'DATE_FIELD': // Item ID of Date field. { 'showDatePickerOnFocus' : true // Displays date picker when Date field is in focus. } } }