Validating a date input based on a date shown in detail view on the same page

On one page, I have constructed a detail view of information where one of the fields is a “Completion Deadline” date.
Below the detail view I have another view (an input form) where the user provides information including an estimated completion date. I want to prevent form submission if the estimated completion date on the input form is after the “completion deadline” shown in the details view above it.
I am a total novice at Javascript but have tried many things based on related topics in the forum with no success. I am guessing the date shown in the details view might need to be converted from string to date. If this is the case, I am clueless on how to do this.
Any help would be greatly appreciated!