Hi @Aitor_ ,
Try this,
var entryDate = date2num($.formattedValue, "MM/DD/YYYY")
var currentDate = date()
if (entryDate lt date()) then
$host.messageBox("Date cannot be in the past", "Date in the past", 0, 0)
else if (entryDate gt currentDate) then
//do Something
endif
Hope that helps!
Regards,
Santosh