I’m looking for the same thing, user enters two dates and would like to check the length time in between.
I used this to get a solution
https://calderaforms.com/doc/cf-state-cf-events-caldera-forms-javascript/
Scroll down to “Setting Caldera Forms Field Values With Custom JavaScript”
basically used that code to grade the second date field, grabbed the first date using
var myFirstDate = document.getElementById(‘fld_9286715_1’).value
turned both dates into days
var myFirstTimeStamp = (new Date(myFirstDate).getTime())/86400000; //convert ms to days
var mySecondTimeStamp = (new Date(value).getTime())/86400000; //convert ms to days
subtract first date from second date and output days to a new field
Just added the script to the header, works for my needs, probably a better solution but I’ll worry about that another time, just needed my form to work