Then on the generate button, you have to use do a conditional formatting to check if the FROM and To date is empty and make it unclickable if it is empty. You could also add some UI formatting on the FROM and TO date, e.g a red border color if the FROM and TO date fields are empty to indicate to the user that the fields must be filled.